1. Consider using froms verification for your purpose. Use Unlogged users to jump to your Upgrade instruction file.
You can add the following configuration file to Web. config.
<Authentication mode = "forms">
<Forms loginurl = "upgrade description file. aspx" name = ". xxxxxx">
</Forms>
</Authentication>
<Authorization>
<Deny users = "? "/>
</Authorization>
2. Add onrequest event processing in global. asax to directly redirect to an html
Then all aspx will be disabled, so you can put a Boolean in the application to determine whether redirect
3. The best method
Place a file in the root directory of the Website: app_offline. htm, which indicates that the file is being upgraded. The upgrade is complete and changed to another name. Note: The HTML characters in the file cannot be too small.
Use of app_offline.htm in Asp.net 2.0
1) modify the static html page file in Asp.net plain (case-insensitive) to the content you want to temporarily display and put it in the root directory of your application. In this way, any external requests will be immediately transferred to this page. At this time, your website can still be accessed, but your application cannot be accessed.
You can also use the ASP. NET configuration management tool under the website menu of vs.net 2005 to make your site offline.
2) When a user accesses a web site, the iiswill first check that the file app_offline.htm is in the directory, which seems to have a higher priority. Under the root directory of the ASP. NET 2.0 site, all requests to .aspxwill be directed to app_offline.htm if the app_offline.htm file exists. In addition, the address bar of the browser displays the requested. aspx URL.
3) Notes:
App_offline.htm cannot be smaller than 512 bytes
IIS cannot stop. Itpub personal space
3. Only requests for the. aspxfile are automatically transferred to the app_offline.htmfile. If the request is a file such as .htm and .asp, it will not be transferred to the app_offline.htm file.
Hosts file.
4. If you are happy, you can write your own code to process client requests, intercept all requests, and switch to a prompt page.