Object reference not set to an instance of an object...

Topics: ASP.NET 2.0
May 30, 2008 at 2:36 PM
Edited May 30, 2008 at 7:36 PM
I installed the web application to a root directory on a site subdomain.  My providor set the root directory as an ASP application and .net 2.0 is running.  When I visit the page, I get the below error.  Anyone have a solution?

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 27: 
Line 28:     #region Private members
Line 29: private static string _fileName = HostingEnvironment.MapPath(BlogSettings.Instance.StorageLocation + "extensions.xml");Line 30:     private static List<ManagedExtension> _extensions = new List<ManagedExtension>();
Line 31:     #endregion

Source File: [removed]\App_Code\ExtensionManager\Manager.cs    Line: 29

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   BlogEngine.Core.Providers.BlogService.LoadProviders() in BlogService.cs:64
   BlogEngine.Core.BlogSettings.Load() in BlogSettings.cs:1566
   BlogEngine.Core.BlogSettings..ctor() in BlogSettings.cs:223
   BlogEngine.Core.BlogSettings.get_Instance() in BlogSettings.cs:250
   ExtensionManager..cctor() in [removed]\blog.frugalguitarist.com\App_Code\ExtensionManager\Manager.cs:29

[TypeInitializationException: The type initializer for 'ExtensionManager' threw an exception.]
   ExtensionManager.ExtensionEnabled(String extensionName) in [removed]\blog.frugalguitarist.com\App_Code\ExtensionManager\Manager.cs:68
   ASP.global_asax.Application_Start(Object sender, EventArgs e) in [removed]\blog.frugalguitarist.com\Global.asax:46
May 30, 2008 at 7:34 PM
Solved by the following post.


Appently on a shared server, you must remove the line for some reason.  Perhaps someone can chime in with the answer...