views:

84

answers:

2

Hi, I was told that to shutdown an ASP.NET site and replace all pages with a static text one should add an HTML file with a special extension. But my google/bing skills are not good enough, can you please help me with this?

Thanks

+3  A: 

Create an "app_offline.htm" file and place it in the main directory of the application/website.

http://asp-net-whidbey.blogspot.com/2006/04/aspnet-20-features-appofflinehtm.html

http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

You can put whatever HTML content you want in the .htm file and any request to your application will display this file.

Note Mehmet Ergut's comment:

"The file size should be at least 512 bytes, or Internet Exploser won't display the contents." – Mehmet Ergut

Baddie
The file size should be at least 512 bytes, or Internet Exploser won't display the contents.
Mehmet Ergut
Thanks guys, app_offline.htm did the job.
amateur
Make sure to mark this response as the answer.
Baddie
A: 

I thought he was referring to index.html

Kelly French
Add an index.html file would just make any requests to your domain (http://www.mydomain.com/) return index.html. If say you had http://www.mydomain.com/test.html, I could still request that if I type it in my browser's address bar even if you have an index.html. If I was to put an app_offline.htm file, any requests to your application will return app_offline.htm
Baddie
+1 whoever you are. I'm still learning the ASP.NET stuff.
Kelly French