问题描述
我需要的脚本在IIS 6.0的应用程序池和网站的创建。我已经能够创建这些使用Adsutil.vbs和Iisweb.vbs将,但不知道如何设置ASP.NET的版本我刚刚创建2.0.50727.0网站。
I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0.
在理想情况下,我想ADSUTIL.VBS更新配置数据库。我该怎么做呢?
Ideally I would like to adsutil.vbs to update the metabase. How do I do this?
推荐答案
@ Chris打我一拳就ADSI方式
@Chris beat me to the punch on the ADSI way
您可以使用ASPNET_REGIIS.EXE工具做到这一点。还有就是每个机器上安装的ASP.NET版本这些工具之一。你可以掏出来 -
You can do this using the aspnet_regiis.exe tool. There is one of these tools per version of ASP.NET installed on the machine. You could shell out to -
此配置ASP.NET 1.1
This configures ASP.NET 1.1
%windir%\microsoft.net\framework\v1.1.4322\aspnet_regiis -s W3SVC/[iisnumber]/ROOT
此配置ASP.NET 2.0
This configures ASP.NET 2.0
%windir%\microsoft.net\framework\v2.0.50727\aspnet_regiis -s W3SVC/[iisnumber]/ROOT
您可能已经知道这一点,但如果你有你的机器上有多个1.1和2.0的网站,只记得切换你在兼容的应用程序池改变ASP.NET版本的网站。 ASP.NET 1.1和2.0网站不要在同一个应用程序池混用。
You probably already know this, but if you have multiple 1.1 and 2.0 sites on your machine, just remember to switch the website you're changing ASP.NET versions on to compatible app pool. ASP.NET 1.1 and 2.0 sites don't mix in the same app pool.
这篇关于的VBScript / IIS - 如何自动设置ASP.NET版本特定网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!