Home › Resources › Articles

How to Take an IIS Web Site Offline

(Microsoft .NET,Microsoft IIS,Microsoft ASP.NET) by Jason Skowronek on 10/27/2009

App_Offline.htm Static Override Page (prefered)

Adding a file in the application root named App_Offline.htm automatically causes the AppDomain to recycle and modifies its behavior such that any request for an ASP.NET resource returns the contents of the App_Offline.htm file instead (along with an HTTP 404 status). Deleting App_Offline.htm automatically recycles the AppDomain again and the web application is back to serving its usual content.*

  1. Create a static HTML page called App_Offline.htm
  2. Filesize must be at LEAST 512MB and cannot exceed 1MB in order to work properly as an offline mode trigger

Redirect the entire IIS Application (alternative)

  1. Create an offline or maintenance mode web page (per design specifications or use default version) and save the page to the application root directory
  2. Open IIS manager on the web server that is hosting the site/application
  3. Right-click the site/application name | Properties
  4. Click the "Home Directory" tab (or "Virtual Directory" tab if an application)
  5. Select "A redirect to a URL"
  6. Enter the fully qualified URL to the offline page
  7. Check "The exact URL entered above" checkbox
  8. Click Apply | OK

Comments (0)

Leave a comment
Name *
Email *
Homepage
Comment

SkoNet provides comprehensive digital consulting services such as: web development, applications development, database design and architecture, business process management, customer relationship management, and many others that help businesses of every size, industry, and geography meet the complex challenge of managing and sharing information on the web. Our skills and expertise in online systems allow us to help customers build applications ranging from simple, single-page web sites to robust enterprise systems.

Online Backup, Ektron Consulting, Ektron Programmer, Ektron Developer, Ektron Partner in Utah, Ektron Partner, Ektron Architect, Ektron Hosting, Salesforce.com Consultant in Utah, Salesforce.com Partner in Utah, Salesforce.com Partner, Salesforce.com Programmer, Salesforce.com Architect, Salesforce.com APEX Programmer