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 34:                     this.Theme=theURL;
Line 35:                // this.Theme = Page.Request.Url.DnsSafeHost.Replace(".", "_");
Line 36:                 this.MasterPageFile = ConfigurationManager.AppSettings[theURL + "_Content"].ToString();
Line 37:                 break;
Line 38:         }

Source File: c:\home\site\wwwroot\Content.aspx.cs    Line: 36

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   Content.Page_PreInit(Object sender, EventArgs e) in c:\home\site\wwwroot\Content.aspx.cs:36
   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