Cannot load GridWeb control instance from session

Subject: GridWeb Error When ViewState Is Disabled

Hello Aspose Support Team,

We are experiencing an issue with Aspose GridWeb when ViewState is disabled.

Error Message:
“Cannot load GridWeb control instance from session. Please check site setting.”

Environment:

  • Aspose.Cells.GridWeb Version: 26.4
  • .NET Framework: 4.8
  • IIS Version: 10

Issue Description:

The GridWeb control works correctly when ViewState is enabled. However, when ViewState is disabled, the following error occurs during postback:

“Cannot load GridWeb control instance from session. Please check site setting.”

Example:

protected void Page_Init(object sender, EventArgs e)
{
    GridWeb1.EnableViewState = false;
    GridWeb1.EditMode = true;
}

When EnableViewState = false, GridWeb is unable to load its instance from Session during subsequent requests. Re-enabling ViewState resolves the issue immediately.

Questions:

  1. Does Aspose GridWeb require ViewState to be enabled?
  2. Is there a supported way to use GridWeb with ViewState disabled?
  3. Are there additional settings required to persist the GridWeb instance in Session when ViewState is disabled?
  4. Is this behavior expected or a known limitation?

Could you please advise on the recommended approach?

Thank you for your assistance.

Best regards,
Farid

@Jugger
Hello,

Thank you for providing the code snippet and the environment details regarding this issue.

We have successfully reproduced the error you described. Our investigation confirms that when ViewState is disabled, the GridWeb control encounters a failure while attempting to restore its state from the Session during postback, leading to the “Cannot load GridWeb control instance from session” message.

While we work on addressing this behavior in the GridWeb control, we suggest you also evaluate our GridJs component. GridJs is a more modern, lightweight, and client-side focused spreadsheet solution that does not rely on ASP.NET ViewState, making it an excellent alternative for web applications requiring high performance and compatibility.

the document:

the demo:

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CELLSGRIDJS-2583

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.