I have been working on a web application using ASP.NET for a while now with no big surprises, until this morning when I encountered an app_offline.htm file hiding in the root of my application's directory. I understand how such a file works from research elsewhere, but I have not been able to understand how the file appeared.
-
IIS might have created this file. – anar khalilov Nov 29 '13 at 12:00
-
Have you used the search? Do you use TFS? See [TFS 2012 Visual Studio plug-in instantly creates and deletes “app_offline.htm” whenever a file is checked out ...](http://stackoverflow.com/questions/16920954/tfs-2012-visual-studio-plug-in-instantly-creates-and-deletes-app-offline-htm-w). – CodeCaster Nov 29 '13 at 12:04
-
This is new feature since .NET 2.0. This is to be shown when site is down. You can see more details [Here](http://weblogs.asp.net/scottgu/archive/2006/04/09/442332.aspx) – PM. Nov 29 '13 at 12:06
-
go through the link same question asked http://stackoverflow.com/questions/2148125/why-does-app-offline-htm-keep-appearing-in-my-web-project – Indranil.Bharambe Nov 29 '13 at 12:12
-
Will it matter that I am using VS2010? – Patrick Developer Nov 29 '13 at 12:12
-
[Refer this link.][1]it will be helpful. [1]: http://stackoverflow.com/questions/2148125/why-does-app-offline-htm-keep-appearing-in-my-web-project?lq=1 – Govinda Rajbhar Nov 29 '13 at 13:04
1 Answers
It seems as if it is a feature of Visual Studio.
SQL Server 2005 express edition does not support multiple processes. Only single process can access database at a time. So when a database is accessed through visual studio, ASP.net runtime cannot access the database. This will result into the internal server error. To prevent this, VS 2005 places app_offline.htm file in the application's root directory. The file contain above message. This causes ASP.net to put the application in offline mode. Please note the accessing database means opening any component of the database (I.e. table, view, stored procedure etc.) into the design window. When design window is closed, VS 2005 removes app_offline.htm file making the application in onliner mode again.
Putting ASP.net Application In Offline Mode Using app_offline.htm

- 13,528
- 3
- 41
- 73
-
Ah! That's what I was looking for, I'm interested in why the process was set in motion :) – Patrick Developer Nov 29 '13 at 12:19