Hosting many SSL sites on Azure using a wildcard certificate with MVC

二次信任 提交于 2019-12-04 10:52:00

I'll start with the easy part, your wildcard SSL certificate should be fine for these sites. You'll just need to make sure that you add a https endpoint to your role and select the appropriate certificate.

From what I can see, you'll need three sites defined in your service definition. First the default one while will be your MVC site. Then one each for your business and enroll sites. Your sites section might look something like this:

 <Sites>
  <Site name="Web">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" />
      <Binding name="mvchttps" endpointName="https" />
    </Bindings>
  </Site>
  <Site name="Enroll" physicalDirectory="\enroll...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "enroll.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "enroll.MyAzureSite.Com" />
    </Bindings>
  </Site>
  <Site name="BusinessLayer" physicalDirectory="\BusinessLayer...">
    <Bindings>
      <Binding name="mvchttp" endpointName="http" hostHeader = "BusinessLayer.MyAzureSite.Com" />
      <Binding name="mvchttps" endpointName="https" hostHeader = "BusinessLayer.MyAzureSite.Com" />
    </Bindings>
  </Site>
</Sites>

It's worth mentioning that deploying multiple sites to a web role has recently been made much easier with the help of the Windows Azure Accelerator for web roles - more info at http://waawebroles.codeplex.com/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!