我们运行一个网站,其中包含许多运行在单个服务器上的IIS应用程序,其中每个应用程序都配置为运行不同的应用程序池.@H_502_2@
我们有一个庞大的代码库,在整个网站上包含超过280个aspx页面.我们的主域包含大约100个aspx页面,而子域包含15或20个.@H_502_2@
当我们进行构建时,我们正在生成一堆dll,我们手动将其复制到生产服务器bin目录中.一旦我们这样做,IIS显然会启动回收编译每个aspx页面和代码隐藏的回收.在这一点上,该网站基本上停止了(有时它需要重新启动 – 通过重新启动Web发布服务 – 再次唤醒它).@H_502_2@
奇怪的是,这只发生在我们部署到主域IIS应用程序时,即www.如果我们以相同的方式将bin文件部署到子域,它几乎立即起作用.@H_502_2@
即使我做了iisreset.exe,这似乎也无法解决问题.@H_502_2@
几个问题:@H_502_2@
>无论如何加速当前进程以便我们不必重新启动服务器?
>是否会有任何明显的代码更改或更新,这将导致需要重新启动服务(有时我们运行iisreset但这似乎没有恢复生命)?@H_502_2@
一些规格:@H_502_2@
>代码编写于:C#
> .net framework:2.0
>服务器:Windows Web Server 2008
> iis版本:IIS7
>数据库:MSsql 2008 Standard@H_502_2@
任何援助将不胜感激.提前致谢.@H_502_2@
了解有关app_offline.htm here和here的更多信息.@H_502_2@
Basically,if you place a file with this name in the root of a web application directory,ASP.NET 2.0 will shut-down the application,unload the application domain from the server,and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm file (for example: you might want to have a “site under construction” or “down for maintenance” message).@H_502_2@
This provides a convenient way to take down your application while you are making big changes or copying in lots of new page functionality (and you want to avoid the annoying problem of people hitting and activating your site in the middle of a content update). It can also be a useful way to immediately unlock and unload a sql Express or Access database whose .mdf or .mdb data files are residing in the /app_data directory.@H_502_2@
Once you remove the app_offline.htm file,the next request into the application will cause ASP.NET to load the application and app-domain again,and life will continue along as normal.@H_502_2@