是否可以将站点(和绑定)添加到我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>
不存在)
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