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.

73 questions
10
votes
3 answers

ASP.NET Core randomly restarts under IIS

We found a problem, ASP.NET Core application on some servers randomly restarts every day at random times. Windows Server 2012 R2 Standard, IIS 8.5.9600.16384 Hosting bundle Microsoft.NETCore.App 2.1.4, Microsoft.AspNetCore.App 2.1.4 Out of process…
Daniil Sokolyuk
  • 484
  • 1
  • 6
  • 10
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
9
votes
3 answers

How to use IIS app_offline.htm file with Azure

I have a brilliantly designed app_offline.htm file that I'd like to display on my site periodically when I'm doing things like backing up the DB. On a server with a real file system, this wouldn't be a problem: I'd just copy app_offline.htm to the…
Armchair Bronco
  • 2,367
  • 4
  • 31
  • 44
8
votes
1 answer

Best practices for using app_offline with webdeploy

When I deploy my web site I need to: Take the site offline. run sql to update the database. update the web site. Put the site back online I would like to script as much of this as possible without have to go the server and make manual…
RMK
  • 877
  • 1
  • 9
  • 16
8
votes
7 answers

stopping app_offline.htm from being created and deleted at each build?

I have a solution with 2 projects in Visual Studio 2008 SP1, .NET Framework 3.5 SP1. a ASP Web site. a Class Library (dll) project. I have a reference from the Web Site to the Class Library, as the Class Library is my data layer. But anyway, the…
Dan
8
votes
2 answers

Ignore file from delete during WebDeploy

I'm using TeamCity to build and deploy a collection of MVC Applications via msbuild and WebDeploy. In a step previous to my solution build/deploy, I copy an app_offline.htm to the deploy directory so that I can perform SQL updates and other…
Anthony Shaw
  • 8,146
  • 4
  • 44
  • 62
6
votes
1 answer

Using app_offline.htm to take an app offline while updating dll's fails while updating dll's

So I sometimes use app_offline.htm to take an app offline while I upload a new version. However, while I am in the process of uploading larger dll's, I get the yellow error-screen saying the dll could not be loaded. This seems to be out of sync with…
Kjensen
  • 12,447
  • 36
  • 109
  • 171
6
votes
6 answers

What are possible causes for App_Offline.htm not bringing the site down?

Normally, I use App_Offline.htm for taking the site offline. But occasionally, when I do that, the site just hangs (like in: browsers wait forever, server gives no response at all). This seems to happen on an updateable site when I change something,…
Abel
  • 56,041
  • 24
  • 146
  • 247
6
votes
0 answers

Change http status 503 to 200 for app_offline.htm

I have integrated in to my .net application that when I want to take my site offline, I place a app_offline file at the root of my web application, as outlined here ScottGu's Blog This results in a 503 status code being returned for all requests to…
amateur
  • 43,371
  • 65
  • 192
  • 320
5
votes
1 answer

Open offline html file programmatically in windows phone 7

I am building an application in windows phone 7. I have some user guide in HTML. I want to use a web-browser to open these files whenever user touches Help menu. But I don't know how to get the local URLs of these files. Could you help me…
Nguyen Minh Binh
  • 23,891
  • 30
  • 115
  • 165
5
votes
1 answer

Deploy a .NET Core application with AppVeyor: file locked by external process (Appveyor agent)

I'm trying to deploy a project on a server using Appveyor agent. However, If I donot not restart or stop application before deployment, it do not works. Web Deploy cannot modify the file 'TestProject.Application.dll' on the destination because it is…
Gabriel Robert
  • 3,012
  • 2
  • 18
  • 36
5
votes
0 answers

Where does msdeploy get it's app_offline from?

So I've been having issues with a large website trying to build itself over and over during publishing, being lazy I wanted to take it offline and back on again with publishing. I followed these…
Tod
  • 2,070
  • 21
  • 27
5
votes
1 answer

Is it possible to use app_offline.htm when publishing via ftp?

Is it possible to configure Visual Studio 2012 to automatically create (and delete) the app_offline.htm file when using ftp as the publishing method? I tried to create the file by hand and add it to the solution (so it would be uploaded…
5
votes
1 answer

bin/*.dll locked when deploying website after app_offline.htm copied and active (shadow copy off)

I am running into an issue deploying a website. Shadow copy is turned off after previous deployment issues with it and deploying the site. Specifically at deploy time I find that even after copying app_offline.htm and verifying that the…
scubadam
  • 61
  • 4
3
votes
1 answer

How to stop a IIS website by copying a file into it

I remember it is possible to stop a website in IIS simply creating a file in the site directory with a special name. But I don't remember the name and can't find it in google. Can you help me?
Robert