Azure和SSL无法在暂存中使用

时间:2012-01-27 17:50:40

标签: silverlight ssl service azure

我使用IIS创建本地证书,我将此证书添加到Azure项目。 当我在本地调试(Https://127.0.0.1:444)时,我的服务运行良好。

但是当我将项目发布到Azure Staging(https:// a7a9e6ab * * .cloudapp.net /)时,我的服务不起作用?

我的web.config

  <system.serviceModel>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true">
</serviceHostingEnvironment>
<bindings>
  <basicHttpBinding>
    <binding name="DefaultBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
      <readerQuotas maxDepth="50" maxArrayLength="2147483647" maxStringContentLength="2147483647" />
      <security mode="TransportWithMessageCredential">
        <message clientCredentialType="UserName" />
        <transport clientCredentialType="None" proxyCredentialType="None" />
      </security>
    </binding>
    <binding name="DefaultSecuredBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
      <readerQuotas maxDepth="50" maxArrayLength="2147483647" maxStringContentLength="2147483647" />
      <security mode="TransportWithMessageCredential">
        <message clientCredentialType="UserName" />
        <transport clientCredentialType="None" proxyCredentialType="None" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="DefaultServiceBehavior">
      <serviceMetadata httpsGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="true" />
      <serviceCredentials>
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="nVentive.Umbrella.Services.UserNamePasswordValidator, nVentive.Umbrella.Services" />
      </serviceCredentials>
    </behavior>
  </serviceBehaviors>
</behaviors>

1 个答案:

答案 0 :(得分:1)

您是否已将服务证书上载到Windows Azure托管服务?您的服务最有效,因为您没有上传证书。请查看以下有关如何在Windows Azure中使用证书的资源:

此外,请注意,如果您使用代码中的服务证书进行一些检查,则必须跳过任何验证,因为没有验证将通过自签名证书。