appcmd cmd 操作IIS

创建子站点

appcmd.exe add app /site.name:"Default Web Site" /path:/TestSite /physicalPath:"C:\Applications"

打开C:\Windows\System32\inetsrv\config\applicationHost.config配置,添加下面的配置

<location path="Default Web Site/TestSite">
<system.webServer>
<security>
<authentication>
<windowsAuthentication enabled="true" />
<anonymousAuthentication enabled="false" />
</authentication>
</security>
</system.webServer>
</location>

猜你喜欢

转载自www.cnblogs.com/lizhanglong/p/10992145.html