Questions tagged [app-offline.htm]

app-offline.htm is the name of an html file that can be used to put an asp.net based website (starting from ASP.NET 2.0) offline.

Starting from ASP.NET 2.0 app-offline.htm is the name of an file that can be used to put an asp.net based website offline. If file with this name is placed in the root of a web application directory, ASP.NET 2.0 will shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file, so usually this file contains a message stating the reason for site's unavailability.

This provides a convenient way to take down an application for example while lenghty maintenance operations are performed.

When app_offline.htm is present, will return this http status code:

HTTP/1.1 503 Service Unavailable

Once the app_offline.htm file is removed, the next request into the application will cause ASP.NET to load the application and app-domain again, and the application will continue to operate in its usual way.

74 questions
124
votes
7 answers

ASP.NET 2.0 - How to use app_offline.htm

I've read about the app_offline.htm file which can be placed within the root of a .NET 2.0 application which will in essence shut down the application and disable any other pages from being requested. I've placed the file in the root, and my site…
Jack Marchetti
  • 15,026
  • 13
  • 73
  • 116
58
votes
1 answer

Timeline for "Device Login" and/or alternatives to offline_access + one time login

I have a small, dinosaur-era command line interface (CLI) app for facebook. There's not a huge user base, but it has its niche. Its most altruistic usage is by those who are partially blind and rely on other text-based command line interfaces. It…
31
votes
9 answers

Custom app_offline.htm file during publish

When I publish my ASP.NET MVC application it generates a app_offline.htm file to take the site offline while it updates the website and then deletes the file once the publish is successful. This is cool and I really like the idea, but I want to…
Charlino
  • 15,532
  • 3
  • 54
  • 72
22
votes
6 answers

app_offline site returning "The service is unavailable."

I am following Scott gu's trick of placing a App_Offline.htm page at the route of my application to bring it offline - http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx It does not seem to be working on one of my sites though. I place…
amateur
  • 40,217
  • 59
  • 181
  • 303
21
votes
3 answers

App_offline.htm created/deleted whenever I check out a file in TFS

I have an AJAX-heavy ASP.NET web application developed using .NET 4.0, using TFS as our source control. We recently upgraded our dev tools to use VS2010 and TFS 2010 exclusively, but now every time a file is checked out, we see visual studio…
XwipeoutX
  • 3,965
  • 4
  • 26
  • 41
14
votes
6 answers

What are suggested alternatives to the often broken app_offline.htm hack?

In quite some scenario's, placing app_offline.htm in the root is just right: you do some updates, the message appears while updating, and that's that. The idea is, as Microsoft puts it, that before anything is called, IIS first checks if…
Abel
  • 52,738
  • 19
  • 137
  • 227
14
votes
6 answers

Change http status 503 to 200 when serving app_offline.htm for specific URL

The app_offline.htm file that ASP.NET serves returns the http status 503. This is the correct behavior for most situations. However, in the scenario where a specific URL is requested (e.g. https://www.mywebsite.com/monitor), I'd like to change the…
Johnny Oshika
  • 45,610
  • 33
  • 151
  • 234
14
votes
2 answers

app_offline.htm throwing HTTP 500 errors on production box

I have created an app_offline.htm file for an ASP.NET MVC2 application running on IIS7 / Win2008 64-bit, and ensured that it's over 512 bytes (it's 2KB right now). On my dev box running Visual Studio 2010, it works like a charm, but when I put it on…
Josh Anderson
  • 5,795
  • 2
  • 32
  • 46
14
votes
1 answer

Is there a way I can still use app_offline.htm on my ASP.NET MVC 2 projects? If not, is there an alternative method?

I loved the features of using app_offline.htm on my ASP.NET WebForm based sites. Upload the file and your app is immediately "offline". Snappy. Now that I'm using MVC 2, I noticed that this no longer works. Is there a way to get this behavior in…
CitizenBane
  • 853
  • 7
  • 17
13
votes
1 answer

Take an MVC web site offline and back online

I'm searching for a method to take a website offline with a message. I know about app_offline.htm, but I would like to do it programmatically. Taking it offline is easy. I can generate app-offline.htm on root, but when I want web site to be back…
Erçin Dedeoğlu
  • 3,688
  • 4
  • 39
  • 58
12
votes
2 answers

App_offline.htm, CSS, images, and aspnet_isapi.dll

So, the site I'm working on is using urlrewriting in coordination with aspnet_isapi.dll (everything is mapped to it). I put up my app_offline.htm file, and all the text shows, however, the CSS or images aren't being served. I'm guessing they're…
StephenPAdams
  • 2,719
  • 2
  • 27
  • 48
12
votes
4 answers

Add css style sheet to app_offline

Well, I'm trying to make custom app_offline.htm and want to add links to my css files in project. But next code doesn't work In console I've got error GET…
JohnyMotorhead
  • 555
  • 1
  • 6
  • 15
11
votes
1 answer

How to use EnableMSDeployAppOffline when doing continuous deployment to azure websites?

According to this post, it's possible to have MSDeploy automatically drop an App_Offline.htm file when deploying. Sadly, it doesn't appear to work when using the VSOnline "GitContinuousDeploymentTemplate" build process and deploying to Windows…
Matthew Belk
  • 1,844
  • 2
  • 19
  • 28
10
votes
2 answers

Why is App_Offline failing to work as soon as you it starts loading dlls?

Could anyone please help me with this. On the production site app_offline.htm works only till you start uploading dlls. As soon as you start uploading dlls it throws following error"Could not load file or assembly 'SubSonic' or one of its…
Manisha
10
votes
3 answers

Why does app_offline.htm keep appearing in my web project?

I regularly (every few days or so) publish my ASP.NET web project to the local web server. But the weirdest thing keeps happening... a file called "app_offline.htm" keeps appearing, unbidden, in my web project! I have deleted this file several…
Shaul Behr
  • 33,989
  • 61
  • 233
  • 360
1
2 3 4 5