Cannot view post pages after new installation

Mar 6, 2011 at 4:22 PM

I just performed a fresh install of BlogEngine.NET 2.0.  Everything was going smoothly until I created a new post.  After creating the post, I was redirected to the post page, only to be presented with an error page.  However, if I navigate back to the home page, I can see the post just fine.  The name of the post page is "http://localhost/BlogEngine2-0/post/2011/03/06/Standard-Fantasy-Football-Scoring-System.aspx" and the exception information is provided below:

 

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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
App_Code.Controls.RecaptchaControl.get_MaxLogEntries() +22
App_Code.Controls.RecaptchaControl.get_RecaptchaLoggingEnabled() +24
App_Code.Controls.RecaptchaControl.OnUnload(EventArgs e) +20
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +252
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Control.UnloadRecursive(Boolean dispose) +188
System.Web.UI.Page.UnloadRecursive(Boolean dispose) +23
System.Web.UI.Page.ProcessRequestCleanup() +43
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.post_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

Mar 16, 2011 at 6:16 PM

I am having the same issue. any resolution?

Mar 16, 2011 at 7:07 PM

For the record, this was all done on my local machine...

Since the exception shown above is somewhat cryptic (and turning on debugging in web.config didn't provide any further information), I decided to open up the website in Visual Studio and run the application in debug mode to see if this would garner more information.  I run the site in debug mode and low and behold the post page loaded just fine.  Confused, I went back to the website (hosted on my local IIS) to verify that I was indeed still getting the exception and it was gone there as well. 

Long story short, I have no idea what happened but it seemed to resolve itself.  It's possible that something I did reset IIS and maybe this fixed the problem.  Maybe opening the site in Visual Studio caused a change which fixed the problem (doubtful).  I may have reset my machine and this somehow fixed the problem.

That's about all I have for you unfortuntaely... 

Mar 21, 2011 at 9:47 PM

Mine resolved itself too. I uploaded all the files again and everything worked fine. I think during the initial upload a few files were missed or corrupted during the transfer.