Server error: Object reference not set to an instance of an object.

Topics: Business Logic Layer
Apr 20, 2010 at 9:50 AM

I just installed BlogEngine.NET and have experienced several small problems (that I all could resolve). I think I am pretty close to being able to use it, but now I run into this error when I try to open the site.

 

Server Error in '/BlogEngine' 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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.Security.RoleManagerModule.OnEnter(Object source, EventArgs eventArgs) +306
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +102
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

I am using BlogEngine.NET on a Windows 2008 server with IIS 7. I have tried several ApplicationPools settings. The 'ASP.NET 4.0 Classic' one gives me a Server Error 500 and the 'Default Application Pool' gives me the error mentioned here.

Anyone that can help me to solve this?

Thanks in advance!

Apr 23, 2010 at 9:16 AM

I realized, after installing the blog, that ASP.NET 2.0 did not show up as one of the application pools. I downloaded it from Microsoft and wanted to install it, but got a notication that it was already installed. After some googling I found that I had to register it with this command:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i


After restarting IIS, I could select the ASP Classic 2.0 app pool and the blog works now.

I hope this information can help other people.