2015-05-19 70 views
1

我有一个在Azure中作为Cloud Service运行的WCF(不带SSL)。WCF和Azure:用真实证书替换自签名证书

我在本地实施了相同的项目SSL。 (自签名证书)

后,我在本地试验,发现一切正常,我购买真正的证书上的Go Daddy,现在我需要弄清楚几个要点:

我看到了几篇文章展示了如何设置角色的配置,以便通过HTTPS将WCF发布到Cloud Service。 在这些文章中,他们通过从安装在计算机上的证书中进行选择来添加证书,然后将证书关联到HTTPS端点。

  1. 为了将证书关联到WCF我必须在本地安装证书吗?
  2. 在Microsoft Azure Portal上有一个“管理证书”选项,用于上载证书并进行管理,我是否需要使用此选项上传证书?
  3. 我需要手动安装证书(就像我与自签名证书”一样,将其配置在IIS和去MMC和移动证书到‘中级证书颁发机构’和等)
  4. 如果我需要手动完成(对问题3的回答是肯定的)我如何自动扩展我的服务?因为这个过程需要自动化。

谢谢。

回答

0

转到您的.CSDEF并添加以下3个标签(相应变化):

<WebRole name="CertificateTesting" vmsize="Small"> 
    ... 
    <Certificates> 
     <Certificate name="SampleCertificate" storeLocation="LocalMachine" storeName="CA" /> 
    </Certificates> 
    ... 
    <Endpoints> 
     <InputEndpoint name="HttpsIn" protocol="https" port="443" certificate="SampleCertificates" /> 
    </Endpoints> 
    ... 
    <Sites> 
     <Site name="Web"> 
      <Bindings> 
       <Binding name="HttpsIn" endpointName="HttpsIn" /> 
      </Bindings> 
     </Site> 
    </Sites> 
    ... 
</WebRole> 

接下来,打开你的.CSCFG并​​添加:

<Role name="Deployment"> 
    ... 
    <Certificates> 
     <Certificate name="SampleCertificate" thumbprint="9427befa18ec6865a9ebdc79d4c38de50e6316ff" thumbprintAlgorithm="sha1" /> 
    </Certificates> 
    ... 
</Role> 

更换指纹thumbprintAlgorithm与您的证书之一。

最后,使用Azure门户上传部署软件包和证书或将其添加到证书选项卡。您必须使用私钥导出证书才能工作。

此链接的更多细节: http://azure.microsoft.com/en-us/documentation/articles/cloud-services-configure-ssl-certificate/

回答你的最后一个问题:当你已经上传了与包的证书,汽车规模将用这个包来提供新的服务器。

+0

解决了我的问题...谢谢。 – Ron