473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

App_offline.htm and 404: why?

App_offline.htm is a very usefull feature during web site updates. But
I don't understand why asp.net engine returns a 404 status code instead
of a "normal" 200.

I created a simple app_offline file:
<html>
<body>
Apllication off line!
</body>
</html>

I put it in the root of my web site. Now for every request IIS returns:

HTTP/1.1 404 Not Found
Server: Microsoft-IIS/5.1
Date: Thu, 09 Feb 2006 07:58:00 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html
Content-Length: 57

<html>
<body>
Apllication off line!
</body>
</html>
I don't understand why "HTTP/1.1 404 Not Found".
I think the right response should be "HTTP/1.1 200 OK"....

Thank you
Fabrizio

Feb 9 '06 #1
2 2692
Fabrizio,

what is not being found is the your App's document.

You didn't request "App_offline.htm".

You requested your app's default document or some other document in your app.

That call is intercepted; the 404 is returned for whichever page was requested,
and then App_offline.htm is displayed, but the 404 refers to the original page requested.


Juan T. Llibre
ASP.NET MVP
ASPNETFAQ.COM : http://www.aspnetfaq.com
==================================
<fh****@gmail.com> wrote in message news:11*********************@g43g2000cwa.googlegro ups.com...
App_offline.htm is a very usefull feature during web site updates. But
I don't understand why asp.net engine returns a 404 status code instead
of a "normal" 200.

I created a simple app_offline file:
<html>
<body>
Apllication off line!
</body>
</html>

I put it in the root of my web site. Now for every request IIS returns:

HTTP/1.1 404 Not Found
Server: Microsoft-IIS/5.1
Date: Thu, 09 Feb 2006 07:58:00 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html
Content-Length: 57

<html>
<body>
Apllication off line!
</body>
</html>
I don't understand why "HTTP/1.1 404 Not Found".
I think the right response should be "HTTP/1.1 200 OK"....

Thank you
Fabrizio

Feb 9 '06 #2
OK. I have understood that. But I think it's not a good implementation.

Infact InternetExplorer does not show the my app_offline page content
but a generic friendly message associated with the 404 status code
(oh, I know I can disable the friendly messages but they are active by
default on all IE).

For info: Firefox display the content.... good but 80 / 90 % of users
use IE.
Fabrizio

Juan T. Llibre wrote:
Fabrizio,

what is not being found is the your App's document.

You didn't request "App_offline.htm".

You requested your app's default document or some other document in your app.

That call is intercepted; the 404 is returned for whichever page was requested,
and then App_offline.htm is displayed, but the 404 refers to the original page requested.


Feb 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Sam777 | last post by:
I was under the impression that creating the app_offline.htm file at the root of the webapp would cause all handles to be closed so that the app could be removed. Unfortunately, this isn't the...
14
by: NormD | last post by:
We have a client-server app using Web Services on an IIS machine. The trace below shows that .NET is searching around for some things (e.g., SystemDrawing.DLL and System.Drawing.EXE) and taking a...
0
by: Marc Scheuner | last post by:
Folks, I'm facing some problems with the cool new "app_offline.htm" feature in ASP.NET 2.0. My web app is being bundled up into an .MSI and installed by executing that MSI - works nicely. My...
2
by: Victor Rodriguez | last post by:
Is there a way to have a custom app_offline file when publishing a website from .NET 2005? thanks, Victor
0
by: raghav | last post by:
Hi Friends I have a question. I work throughtout the day with my application (C#.NET, ASP.NET 2.0, SQL SERVER 2005 ). By end of the day if I see my Recycle Bin full of app_offline files. Then...
5
by: jonefer | last post by:
everyone talks about how cool this file is, and I imagine it would be if I intentionally put it there. However, I just want to publish my page. Thus far, I have been successful publishing it to...
2
by: Larry Rebich | last post by:
App_Offline.htm DOES take the site down. Good. App_Offline.htm's message is not displayed. Bad I'm getting a generic 404 message rather than the App_Offline message - which contains a...
0
by: Adam Nofsinger | last post by:
Hi, I recently started having a problem with Visual Studio .NET 2005 and creating / viewing ASP.NET 2.0 websites. About 1/4 of the time, when I click on a page and click "View in Browser", or...
1
by: Ned White | last post by:
Hi All, is it possible to customize the app_offline.htm file that VS creates ? or can i use diffrent htm file instead of app_offline.htm when deploying the application ? Thanks
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.