stevebot
stevebot

Reputation: 24005

Display downtime page when publishing application

Is it possible in ASP.NET MVC to display a downtime page when publishing a project out to a server? Right now, if I hit the page while I am publishing I get an error:

Could not load type "App.MvcApplication"

It would be awesome if we could setup a downtime page so that users know to come back at a later time, instead of thinking that the app is busted.

Upvotes: 5

Views: 853

Answers (2)

Srikanth Venugopalan
Srikanth Venugopalan

Reputation: 9049

An alternative to doing this in the application is to have IIS sort this out for you.

Application Initialization Module gives this feature, and also allows you to run warm-up scripts.

Upvotes: 1

bevacqua
bevacqua

Reputation: 48476

You could add an app_offline.htm page to your application root, traffic will be redirected to that page until you remove or rename it.

More info

Upvotes: 5

Related Questions