如何重新启动asp.net应用程序之外修改的web.config [英] how to restart asp.net application besides modifying web.config

查看:180
本文介绍了如何重新启动asp.net应用程序之外修改的web.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有反弹,除了从应用程序内触及的web.config一个asp.net应用程序推荐的方式?为 HttpRuntime.UnloadAppDomain();在preferred方式做到这一点?如果是的话,你在哪里做?在页面的卸载或应用程序中的其他地方?

Is there a recommended way to bounce an asp.net application besides touching web.config from inside the application? is HttpRuntime.UnloadAppDomain(); the preferred way to do this ? and if so where do you do this? In the unload of a page or some other place in the application?

推荐答案

如果这是.NET 2.0或更高版本,那么您可以在一个App_offline.htm文件添加,向服务器请求,删除它,然后使另一个请求到服务器。

If this is .NET 2.0 or greater, then you can add in an "App_offline.htm" file, make a request to the server, remove it, and then make another request to the server.

这一系列事件将迫使ASP.NET卸载只要将文件app_offline.htm的文件夹中存在该应用程序。

This sequence of events will force ASP.NET to unload the application for as long as the app_offline.htm file exists in the folder.

斯科特Guthrie的博客条目:
<一href=\"http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx\">http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

Scott Guthrie's blog entry on it: http://weblogs.asp.net/scottgu/archive/2005/10/06/426755.aspx

这篇关于如何重新启动asp.net应用程序之外修改的web.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆