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 28:                 
Line 29:                     this.Theme=theURL;
Line 30:                     this.MasterPageFile = ConfigurationManager.AppSettings[theURL + "_Master"].ToString();
Line 31:                 //this.MasterPageFile = ConfigurationManager.AppSettings[Page.Request.Url.DnsSafeHost.Replace(".", "_") + "_Master"].ToString();
Line 32:                 break;

Source File: c:\home\site\wwwroot\Default.aspx.cs    Line: 30

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   _Default.Page_PreInit(Object sender, EventArgs e) in c:\home\site\wwwroot\Default.aspx.cs:30
   System.Web.UI.Page.OnPreInit(EventArgs e) +11692239
   System.Web.UI.Page.PerformPreInit() +46
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +334


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