This project is read-only.

First load -> error404 -> subsequent loads are fine

Topics: ASP.NET 2.0
Nov 2, 2009 at 3:09 PM

I just installed a fresh copy of BlogEngine.NET 1.5 and I keep getting this error404 whenever the application is loaded first. 

I get the following URL:  /blog/error404.aspx?aspxerrorpath=/blog/default.aspx

If I immediately load /blog/default.aspx again, the page loads fine without the error404. 

Has anyone experienced this before?

Any help is apprechiated. 

Nov 2, 2009 at 9:20 PM

In my installation the blog-Directory is defined as virtual directory in IIS. 

May be it is necessary to convert the directory into an application?
(Right click on the directory in Internet Information Services -> Convert to Application.)



Nov 4, 2009 at 10:10 AM

When an unhandled error occurs, the default behavior is for you to be re-directed to error404.aspx.  You can turn this off by changing the <customErrors> tag in the web.config file.  If you change it to the following:

<customErrors mode="Off">

.... then you should get an actual error message rather than the generic redirect to error404.aspx.

Nov 4, 2009 at 2:33 PM

Yes, I did turn customErrors off and then saw some gibberish on every first load.  It looked like a memory dump. 

Anyhow, the evil was that I didnt set the .NET Trust Level to High but instead it was set to Medium which I believe caused the failed first loads.  As soon as I set it to High, it worked fine.