Free Support Forum - aspose.com

GridWeb license times out?

Useing GridWeb for .Net, latest version. I have a web site where my users stay on the page for quite a awhile, so I have code that keeps the session alive by ‘poking’ the server every 5 minutes or so on a timer function in javascript. This seems to work fine, except on pages where I use GridWeb, which after about 15 min of inactivity seems to lose the licensing info, coming back with “Evaluation Copyright warning” and limited functionality. Do I need to periodically ‘renew’ licensing by calling the .SetLicense method? If so, how frequently. Here is my current OnInit:

protected override void OnInit(EventArgs e)
{
if (!IsPostBack)
{
//Instantiate the License class
Aspose.Cells.GridWeb.License license = new Aspose.Cells.GridWeb.License();
//Pass only the name of the license file embedded in the assembly
license.SetLicense(“Aspose.Grid.lic”);
}

// this is the code that keeps the page alive
// .InitComponent creates the JS timer function,
// IsKeepAlive returns true if the page OnInit fired in response to a keep alive request

PortalComponent.InitComponent(this, true);
if (PortalComponent.IsKeepAliveRequest(Request))
return;

Hi,

Please move your licensing code in some other events e.g Application_Start event as the licensing code only needs to be executed once per application life cycle and it would be better.
Check the document for licensing:
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/licensing.html


Also, check the document for your reference if it can help you.
http://www.aspose.com/documentation/.net-components/aspose.cells-for-.net/license-file-not-working-anymore.html

Thank you.