How to take an ASP.NET application off line . . .

. . . without turning off IIS

Why would you want to do this?

Well, you might have more than one application running under a specific IIS server instance.  Or, maybe you don’t have access to IIS so you can turn it off.  But, you still want to take the application off line so that you can perform maintenance on it.

All you need to do is create an app_offline.htm file and place it in the application root directory.  Whatever is in app_offline.htm will display instead of your application whenever someone visits the site.  To make the application available again, remove the app_offline.htm file from the application directory.

Like this Article? Subscribe to get every article sent to your email.

Related Post

  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it […]
  • How to properly access controls in the Master PageHow to properly access controls in the Master Page One of the great new features in ASP.NET 2.0 has been the ability to use master pages to layout the common elements of the web site.  This certainly works better than top and bottom […]
  • ASP.NET GridView Edit All Rows At OnceASP.NET GridView Edit All Rows At Once I just saw a question about this yesterday and realized that while I know how to do this, not everyone does.  So, here we go...Here's the problem.  You want to be able to edit all of […]
  • Anonymous TypesAnonymous Types So, let's get to work looking at anonymous types in .NET.As you know, last week we looked at object initialization.  Object initialization allows us to instantiate an object and […]
  • Why ASP.NET Changes Don’t Change AnythingWhy ASP.NET Changes Don’t Change Anything Has this happened to you? You make a change to a codebehind file or a web.config file and you rerun the application to see the effect and there is no change from the previous […]

About Dave Bush

Dave Bush is a Full Stack ASP.NET developer. His commitment to quality through test driven development, vast knowledge of C#, HTML, CSS and JavaScript as well as his ability to mentor younger programmers and his passion for Agile/Scrum as defined by the Agile Manifesto and the Scrum Alliance will certainly be an asset to your organization.