更改 IIS 6 应用程序池而不影响整个服务器上的应用程序池
我不确定是否发生了奇怪的事情或者这是否正常,但是从框架 4 开始,当我在 IISv6 安装上创建新站点时,我常常收到一条消息,说更改为框架 4 会导致 IIS 重新启动(但这自从几次更新后就消失了),我认为当我更改框架时它仍然会重新启动服务器,只是不再发出警告。所以我做了一些调查并编写了一个脚本,允许我切换框架版本而不需要这样做。
@Echo Off
set /p id=Enter Site Instance:
echo %id%
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -norestart -s W3SVC/%id%
pause
当我更改任何给定 Web 应用程序上的应用程序池时,我现在遇到的问题是:它似乎会导致其他应用程序池(包括我添加到的应用程序池)刷新。 我有时会遇到开关导致每个应用程序池停止的情况,然后我必须再次重新启动它们,这可能会导致一些停机时间。我已经开始只在清晨或工作日结束时发布新网站,以避免尽可能多的干扰,但我不明白为什么会发生这样的事情。
我的设置是一个用于测试的应用程序池,一个用于实时应用程序池,一个用于管理站点,但是当我将站点从测试更改为实时时,它将导致所有应用程序池受到影响。
谁能告诉我这是否是以前版本的框架中经常发生的事情,以及是否有可能的解决方法,例如我可以编写应用程序池切换脚本而不影响任何其他应用程序池
编辑2011-08 -01
找到这篇文章:http://msdn.microsoft.com/en-us/library/k6h9cz8h%28VS.80%29.aspx, 其中提到了一个名为 iisapp
的脚本,看起来它可以完成这项工作,将进行更多调查。
I'm not sure if something odd is happening or if this is normal, but since framework 4 when I create a new site on our IISv6 install I used to get a message saying that changing to framework 4 would cause IIS to restart (but this has gone away since a few updates ago), I think it still restarts the server when I change the framework, just no warning any more. So I did a bit of investigation and wrote a script that allowed me to switch the framework version without doing that.
@Echo Off
set /p id=Enter Site Instance:
echo %id%
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -norestart -s W3SVC/%id%
pause
The problem I now have occurs when I change the app pool on any given web app; it appears to cause the other app pools (including the one I add to) to refresh.
I have sometimes had instances of a switch causing every app pool to stop, and then I have to restart them all again which can cause a bit of downtime. I have taken to only release new sites early in the morning or at the end of my work day, so as to avoid as much disruption as possible, but I dont see why something like this should be happening.
The setup I have is one app pool for test, one for live and one for the admin site, but when I change a site from test to live, it will causes all the app pools to become affected.
Can anyone tell me if this is something that always happened with previous versions of the framework and if there is a possible work around, for example can I script the app pool switch without affecting any of the other app pools
Edit 2011-08-01
found this article: http://msdn.microsoft.com/en-us/library/k6h9cz8h%28VS.80%29.aspx,
which mentions a script called iisapp
and looks like it might do the job, will investigate more.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在此网站上找到了答案:http://forums.iis.net/t/1152572.aspx< /a>
在管理脚本中使用名为 adsutil 的 vb(不是我想的那样的
iisapp
...),您可以在批处理文件中编写以下内容。Found the answer on this site: http://forums.iis.net/t/1152572.aspx
using a vbs in adminscripts called adsutil (not the
iisapp
as I thought...) you can write the following in a batch file.