Object reference not set to an instance of an object.

Server Error in '/' Application.

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:


Line 642:            sSQL = "INSERT INTO [WebStatistics] (" & sInsDetStats & ") VALUES (" & lCatGrpID & ", "
Line 643:            sSQL &= WebID & ", '" & dtDate.ToShortDateString & "', '" & dtDate.ToLongTimeString & "', '"
Line 644:            sSQL &= Current.Session("LoggedUser") & "', '" & Current.Request.ServerVariables("REMOTE_ADDR") & "', '" & Current.Request.ServerVariables("HTTP_ACCEPT_LANGUAGE").ToString & "', '"
Line 645:            sSQL &= GetOS() & "', '" & Current.Request("ScreenResolution_DUMMY") & "', '"
Line 646:            If Not Current.Request.UrlReferrer Is Nothing Then

Source File: C:\inetpub\wwwroot\App_Code\AdvancedWebPageFunctions.aspx.vb    Line: 644

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Advancedwebpagefunctions.InsertStatistics(Int64 WebID, Int32 iThis) in C:\inetpub\wwwroot\App_Code\AdvancedWebPageFunctions.aspx.vb:644
   Querypagecategory.QueryCategory(Int32 iThis, Boolean bTrackDetailStats, String sTableName, Boolean bSwitchTable) in C:\inetpub\wwwroot\App_Code\QueryPageCategory.aspx.vb:841
   Advancedwebpagefunctions.ShowCategory(Boolean bDisplayWebCategory) in C:\inetpub\wwwroot\App_Code\AdvancedWebPageFunctions.aspx.vb:943
   Advancedwebpagefunctions.Main() in C:\inetpub\wwwroot\App_Code\AdvancedWebPageFunctions.aspx.vb:2919
   ASP.advancedwebpage_aspx.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\advancedwebpage.aspx:15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0