We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HELP: Strange error: Object reference not set ~every ten days

Hi guys,

we’re having a big problem with your components. There is an error occurring (please see the code block for further details) from time to time (~ every 10 days). But the error message does not make sense to us.

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
.(Stream Ԏ) +150
.(String , Assembly ) +78
Aspose.Cells.License.SetLicense(String licenseName) +42
xxx.DBSim.KBA.Base.PageBase.Page_Load(Object sender, EventArgs e) +42
xxx.DBSim.KBA.SimulationStart.Page_Load(Object sender, EventArgs e) +1172
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +47
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

Both DLL’s (Cells and PDF) are located in the BIN-Directory (License-Files in the Resources-Directory).

Stranger than this is, that our customer can solve the problem, when replacing the license-file with a 1:1 copy of it (same creation date, same file size, etc.). Then it works again. For about 10 days. Then “the show” starts again…

We think that there is some kind of caching (assembly cache, iis-cache, application pooling…) that conflicts with your Components. Further we cannot limit the problem more exactly. We hope that information is enough for you …

I’m sorry to say the problem gets very annoying and our customer is not interested to continue doing this workaround every week.

Please give us any information or your ideas, how we can solve this problem once and for all.

Thanks in advance,

Greetings Christian

Hi Cristian,

That's really a very strange problem and we never found it before. Maybe it's caused by concurrent SetLicense calls. You can try to move your SetLicense calls from Page_Load event to Session_Start event. And I think it's best to put it in Application_Start event. SetLicense method only needs to be called just once in your application.

Hi Laurence,

thx for your suggestion. We'll try and tell you the result...

Greetings Christian