I have a site hosted on FastHosts servers with medium trust.
I'm getting the following error every month or so, recycling the app by editing Web.config makes the problem go away but the client is not very happy about it. Any one have any ideas? Could it be down to a lost database connection? Seems unlikely as a recycle sorts it out.
Here is the error, any help gratefully received
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 32: string pageDatabasePath = SiteStructure.GetDatabasePath(Request.AppRelativeCurrentExecutionFilePath); Line 33: Line 34: SubSonic.Query query = new SubSonic.Query("Metatag"); Line 35: query.QueryType = SubSonic.QueryType.Select; Line 36: query.WHERE("Path", pageDatabasePath);
Source File: e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs Line: 34
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] System.Data.DataTableCollection.InternalIndexOf(String tableName) +4831732 System.Data.DataTableCollection.get_Item(String name) +17 SubSonic.SqlDataProvider.GetTableSchema(String tableName, TableType tableType) +419 SubSonic.DataService.GetSchema(String tableName, String providerName, TableType tableType) +149 SubSonic.DataService.GetTableSchema(String tableName, String providerName) +57 SubSonic.Query.BuildTableSchema(String tableName, String providerName) +43 SubSonic.Query.BuildTableSchema(String tableName) +43 SubSonic.Query..ctor(String tableName) +198 UserControls_HTMLHead.SetupMetatags() in e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs:34 UserControls_HTMLHead.Page_Load(Object sender, EventArgs e) in e:\DOMAINS\s\sbs.nhs.uk\user\htdocs\UserControls\HTMLHead.ascx.cs:27 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +50 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Control.LoadRecursive() +141 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082