Aspose.Cells.GridWeb SessionMode not working

Hi,

We are using the latest version of Aspose.Cells and we are unable to use a SessionMode that is different from ‘Session’ on a GridWeb control.

When we set SessionMode=‘ViewState’ the page immediately returns an error because it ‘cannot load the gridweb from Session’.
When we set SessionMode=‘File’ the page loads and renders the control correctly. We can see the session file being created. However when there is a recycle on the ApplicationPool it returns the same ‘cannot load gridweb from session’ error. This is the behaviour of using SessionMode=‘Session’ which we are trying to avoid.

On some of our clients the ApplicationPool recycles frequently making it hard to use the pages where there is a GridWeb control.

On our legacy application with a very old version of Aspose (2.7.5) we are able to use SessionMode=‘ViewState’ without any issues.

A sample project can be found here.

Here is a print of the error:
Error.png (34.4 KB)

Is there any configuration we are missing?

Thanks for your support.

@virginia.nascimento,
We need to investigate this issue in detail therefore we have logged it in our database. You will be notified here once any update is ready for sharing.

This issue is logged as:
CELLSNET-49069 - Aspose.Cells.GridWeb SessionMode not working

Please try this fix.the issue shall be fixed.both SessionMode=‘ViewState’ or SessionMode=‘File’ shall be ok.
Aspose.Cells.GridWeb.21.8.6.zip (6.9 MB)

Hi, Thanks for the fast response. However the issue remains.

Even with SessionMode different from ‘Session’, when the Application Pool refreshes the page returns the exception " can not load GridWeb control instance from session.please check site setting.".

Additionally when I use SessionMode=‘ViewState’ it works the same way as SessionMode=‘File’, unless I specify the ‘SessionStorePath’ it tries to write to ‘C:’ and returns an exception for lack of permissiosn.

@virginia.nascimento,
We have noted the feedback for our reference.

when use SessionMode=Session, all the data is stored in session. So if session timed out, the exception will raise.
when use SessionMode=‘ViewState’ and SessionMode=‘File’ ,you need to set SessionStorePath.
all the spreadsheet related info is stored at SessionStorePath

The problem is that when we use SessionMode=‘ViewState’ or SessionMode=‘File’, when the session times out, the exception is being raised the same way as when we use SessionMode=Session.

@virginia.nascimento,

Thanks for your feedback and details.

We will look into the details and get back to you soon.

@virginia.nascimento,

Could you please create a separate VS.NET (runnable) project (using Aspose.Cells.GridWeb 21.8.6 with latest resource files), zip the project and share with us via some file sharing service (e.g. Google drive, dropbox, etc.) to reproduce the issue on our end. We will check your issue soon.

Here is the updated sample project.
I included a version ready to publish on IIS.

The steps to reproduce the issue are:

  1. Publish the website
  2. Open the Default.aspx and click on Button. It should work well.
  3. Then recycle the Application Pool
  4. Click on Button again. An exception is thrown because the gridweb cannot be loaded from session, even though it is configured to use a File.

@virginia.nascimento,
We are looking into these details and will share our feedback soon.

The issues you have found earlier (filed as CELLSNET-49069) have been fixed in this update. This message was posted using Bugs notification tool by simon.zhao

I can reproduce the issue,after recycle on IIS , the root cause is the session store directory is lost after recycle. We will make it as a new appsetting item in web.config,the key name is:
aspose.cells.gridweb.session_store_path
thus the path can be kept after IIS recycle
this is an example in web.config.
<appSettings>
<add key="aspose.cells.gridweb.acw_client_path" value="/grid/acw_client/"/>
<add key="aspose.cells.gridweb.session_store_path" value="D:\tmpstorecache\"/>
</appSettings>
We will send out the fix soon.

@virginia.nascimento Please try this fix Aspose.Cells.GridWeb.21.9.1.zip (6.9 MB)