2011-06-15 92 views

回答

2

這是一個角色,對吧?你可以把你的ServiceDefinition放在一起看嗎?通常這是因爲您配置了輸入端點或綁定。這是一個簡單的例子,在3個不同的端口上有3個站點。

<?xml version="1.0" encoding="utf-8"?> 
<ServiceDefinition name="WindowsAzureProject1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"> 
    <WebRole name="MvcWebRole1"> 
    <Sites> 
     <Site name="Web1" physicalDirectory="../pathtowebsite1"> 
     <Bindings> 
      <Binding name="Endpoint1" endpointName="Endpoint1" /> 
     </Bindings> 
     </Site> 
     <Site name="Web2" physicalDirectory="../pathtowebsite2"> 
     <Bindings> 
      <Binding name="Endpoint2" endpointName="Endpoint2" /> 
     </Bindings> 
     </Site> 
     <Site name="Web2" physicalDirectory="../pathtowebsite3"> 
     <Bindings> 
      <Binding name="Endpoint3" endpointName="Endpoint3" /> 
     </Bindings> 
     </Site> 
    </Sites> 
    <Endpoints> 
     <InputEndpoint name="Endpoint1" protocol="http" port="8080" /> 
     <InputEndpoint name="Endpoint2" protocol="http" port="8081" /> 
     <InputEndpoint name="Endpoint3" protocol="http" port="8082" /> 
    </Endpoints> 
    </WebRole> 
</ServiceDefinition>