I'm currently working on a website for a software company. I have a mechanism that runs as soon as the page loads (in Page_OnLoad, Masterpage code file), creates a new instance of an own class and runs a function from there. Everything was running fine for weeks, and I worked on the website at completely different pages/areas that do not affect my current cause in any way.
So the following happend: I tried the website on the asp.net dev server: Everything was fine and working correctly. So I uploaded it to my IIS server. Accessed the website: Everything still running without errors. 20 minutes or so later, I refreshed the page: NullReferenceException, out of nowhere. And now I can't get rid of it, whatever I do.
This is the message from the stack:
[NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.]
EITS.WWW.Helper.cUserLog.TrackUserLog(HttpRequest request) in C:\EIT\Projekte\eits.ch\www.eits.ch\EITSWeb\www.eits.ch\Includes\cUserLog.cs:72
EITS.WWW.IndexMaster.Page_Load(Object sender, EventArgs e) in C:\EIT\Projekte\eits.ch\www.eits.ch\EITSWeb\www.eits.ch\Index.Master.cs:22
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
System.Web.UI.Control.LoadRecursive() +70
System.Web.UI.Control.LoadRecursive() +189
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3063
The Masterpage code file:
http://codetidy.com/3244/
The class that is invoked:
http://codetidy.com/3245/