Friendly Error Page App_Offline.htm

n ASP.NET 2.0, while you’re in the process of updating your site, you can expose a friendly error page by including a file called app_offline.htm in your site’s root. If this file exists, all requests to the site will be redirected to this page. The only way to get around this is to delete the file. The usage scenario for this is for site maintenance, and it can be easily included as part of a deployment script, where this is the first file added and the last file deleted during the deployment. You can read more about this feature here.

Excerpt:

To take a Web application offline before deployment

  1. Create a file called App_offline.htm and place it in the root of your target Web site.
  2. Put a friendly message in the App_offline.htm file to let clients know that you are updating the site.
    While the App_offline.htm file exists, any request to the Web site will redirect to the file.

    NoteImportant
    Remember to remove the App_offline.htm file after you are finished copying files.

Fonte: http://aspadvice.com/blogs/ssmith/

Deixe uma resposta

O seu endereço de email não será publicado. Campos obrigatórios marcados com *