开发者

Changing Framework Version for an IIS 7 Virtual Directory from the Command Line

Is there a programmatic way from the command line to change the .NET Framework version for a particular virtual directory in IIS 7.0?

We're using the mkiisdir.exe tool from NAntContrib to create virtual directories, but we need to change the framework version to 4.0 for the newly created virtual directory. mkiisdir.exe doesn't 开发者_运维百科appear to have options that allow this to be controlled.

We're looking for a way to do this either through mkiisdir.exe or another tool - whatever works.

Thanks in advance! Jeff


You could use AppCmd.exe to set the runtime version for the AppPool you create: So assuming that your application is using TestPool Application Pool, then you can:

appcmd.exe set config  -section:applicationPools /[name='TestPool'].managedRuntimeVersion:"v4.0"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜