我在设置一个包含三个站点的 Web 角色时遇到问题(Azure v1.6,完全信任)。
下面是它在 IIS Express 中的配置方式:
<site name="Empty.Dummy.Site" id="2">
<application path="/" applicationPool="appPool">
<virtualDirectory path="/" physicalPath="c:\Sites\Empty.Dummy.Site" />
</application>
<application path="/mainSite">
virtualDirectory path="/" physicalPath="C:\Sites\mainSite" />
</application>
<application path="/mainSite/virtualChild">
<virtualDirectory path="/" physicalPath="c:\Sites\virtualChild" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:55555:localhost" />
</bindings>
</site>
What's missing in ServiceDefinition.csdef is the "path" attribute.
I've tried a lot using nested virtual path and things but not got it to work.
For example:
<Sites>
<Site name="Empty.Dummy.Site" physicalDirectory="c:\Sites\Empty.Dummy.Site >
<VirtualApplication name="mainSite" physicalDirectory="C:\Sites\mainSite">
<VirtualApplication name="virtualChild" physicalDirectory="c:\Sites\virtualChild"/>
</VirtualApplication>
<Bindings><Binding name="Endpoint1" endpointName="HttpIn" /></Bindings>
</Site>
有什么建议或其他选择吗?
我正在寻找的解决方案应该在同一个网络角色中产生 3 个站点!