是否可以将站点(和绑定)添加到applicationHost.config
IIS Express 或 IIS 文件中?
这是我必须手动添加的一个(效果很好)...
<site name="Our Awesome website" id="4">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Projects\XWing\Code\Application\Website" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:1200:localhost" />
<binding protocol="http" bindingInformation="*:80:localhost.www.mywebsite.com.au" />
<binding protocol="https" bindingInformation="*:44302:localhost.www.mywebsite.com.au" />
<binding protocol="http" bindingInformation="*:80:localhost.www.mywebsite2.com" />
<binding protocol="https" bindingInformation="*:44302:localhost.www.mywebsite2.com" />
/>
<site>..</site>
这可能吗?(我假设不是存在)
答案1
New-Website 和 New-WebBinding[2] 小程序应该可以执行您所要求的操作。
1:http://technet.microsoft.com/en-us/library/ee790605.aspx
2:http://technet.microsoft.com/en-us/library/ee790567.aspx