When ASP.NET 2.0 throws 404's at you...#

If you're getting curious HTTP 404 errors in your ASP.NET 2.0 application, be sure to check for a zero-length "magic file" called app_offline.htm and delete that. If this file is present in your web site, then the entire application will be considered offline by the ASP.NET runtime.

While certainly useful as such to quickly disable an entire site, it's not so great that the "magic file" can also "magically appear", especially since there's no indication as to why you're getting the 404, so you can spend quite some time chasing bugs that aren't there. Fortunately, post-beta 2 builds will be providing a proper explanation.

The reason it can appear by itself is that it's used to "take the application offline" when copying a web site. If this operation crashes somewhere in the middle for some reason, the file doesn't get deleted (while we wait for a transactional filesystem anyway) and bite you in your, errr, isapi filter.

Blog | Programming | .NET | ASP.NET | Whidbey
Thursday, June 30, 2005 8:25:55 AM (Romance Standard Time, UTC+01:00)
I have the curious HTTP 404 errors in my web application after installing VS.NET 2005 and publishing to IIS.
but I can not solve the problem with your helpful infomation.
Because there is no app_offline.htm file in my machine at all.
I hope i couldn't find it.
Can you tell me the specific path that the htm file is located.
or Let me know what i should do for the next step.
thanks.
Monday, July 11, 2005 10:49:21 AM (Romance Standard Time, UTC+01:00)
Yeah... same here, i dont have the app_offline.htm file either. I did an entire search on my disk and didn't find the file :( any other ideas?
Monday, July 11, 2005 8:05:31 PM (Romance Standard Time, UTC+01:00)
If it's not the app_offline.htm file, then I don't really know what's hitting you guys, sorry. Are you sure your IIS is running and that you can access plain old html files in that virtual root? If not, then the ASP.NET runtime won't even have anything to do it so I'd take a look at that first...
Monday, October 16, 2006 5:29:29 PM (Romance Standard Time, UTC+01:00)
Just to add to this discussion... I too am getting the 404. I do not have the app_offline.htm file. If I switch the site to run under .net 1.1 I get an exception page error about the new config xml schema. If I switch it back to 2.0 I get a 404. I also have custom 404 page configured in IIS, but it does not go to that page. Just a generic 404. It appears the 2.0 framework is somehow causing this issue.
jda
Comments are closed.
All content © 2012, Jelle Druyts
On this page

Recent Photos
www.flickr.com
This is a Flickr badge showing public photos from Jelle Druyts. Make your own badge here.
Advertising
Top Picks
Statistics
Total Posts: 350
This Year: 0
This Month: 0
This Week: 0
Comments: 530
Archives
Sitemap
Disclaimer
This is my personal website, not my boss', not my mother's, and certainly not the pope's. My personal opinions may be irrelevant, inaccurate, boring or even plain wrong, I'm sorry if that makes you feel uncomfortable. But then again, you don't have to read them, I just hope you'll find something interesting here now and then. I'll certainly do my best. But if you don't like it, go read the pope's blog. I'm sure it's fascinating.

Powered by:
newtelligence dasBlog 2.0.7226.0

Sign In