Search

App_Offline.htm file should cause .NET Framework to return Http Status Code of 503 by asdf23451234

Closed
as Won't Fix Help for as Won't Fix

7
1
Sign in
to vote
Type: Bug
ID: 319986
Opened: 12/27/2007 1:10:15 PM
Access Restriction: Public
1
Workaround(s)
7
User(s) can reproduce this bug
Currently placing a App_Offline.htm file in the application root of a ASP.NET application causes ASP.NET to return a http status code of 404 File Not Found. The correct status code would be 503 Service Unavailable.

Returning an incorrect status code could cause search engines to drop pages from their indexes when websites are being updated and provide incorrect feedback to end-users.
Details (expand)
Product Language
English

Version

.NET Framework 2.0 Service Pack 1
Operating System
Windows Server 2003
Operating System Language
English
Steps to Reproduce
1. Place a file call app_offline.htm in an ASP.NET configured application.
2. Open the application in a browser with tools to view HTTP header information
3. View header information.
Actual Results
Cache-Control: private
Date: Thu, 27 Dec 2007 21:05:05 GMT
Content-Length: 2670
Content-Type: text/html
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727

404 Not Found
Expected Results
Cache-Control: private
Date: Thu, 27 Dec 2007 21:05:05 GMT
Content-Length: 2670
Content-Type: text/html
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727

503 Service Unavailable
TAP Code (if applicable)
 
      You can indicate your satisfaction with how Microsoft handled this issue by completing this quick 3 question survey. [Details]

 

File Attachments
0 attachments
Sign in to post a comment.
Posted by Jon Galloway on 10/13/2011 at 7:52 PM
This was fixed in .NET 4 - take a look at System.Web.dll in Reflector / ILSpy, look at System.Web.HttpRuntime.CheckApplicationEnabled().
Posted by albattran on 4/17/2010 at 6:08 AM
Scott Guthrie promoted this as the way to bring ASP.Net apps offline.
If that you are not planning on fixing it, then you this should not be promoted as the way to put maintenance messages on ASP.Net website.
Posted by Microsoft on 1/3/2008 at 5:20 PM
Thank you for submitting this issue for our consideration.

The app_offline.htm functionality was designed primarily for handshaking between Visual Studio and ASP.NET when developing a web application using a Sql Server Express attached database. Although app_offline.htm can be used on production sites, there are currently no plans to modify or enhance its existing functionality.
Posted by Microsoft on 12/27/2007 at 8:54 PM
Thanks for your feedback. We are escalating this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you,
Visual Studio Product Team
Sign in to post a workaround.
Posted by Crotchy on 1/13/2010 at 7:11 AM
This is old news but the workaround is here:
http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx