0

我有Service1以下配置的简单 WCF 服务:

<behaviors>
  <serviceBehaviors>
    <behavior name="SecuredBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true"/>
      <serviceCredentials type="System.ServiceModel.Description.ServiceCredentials">
        <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="WCFS.Service1,WCFS"/>
        <serviceCertificate findValue="BasicWCFCert" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
        <windowsAuthentication includeWindowsGroups="false"/>
      </serviceCredentials>
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <wsHttpBinding>
    <binding name="SecuredWsHttpBinding">
      <security mode="Message">
        <message clientCredentialType="UserName"/>
      </security>
    </binding>
  </wsHttpBinding>
</bindings>
<services>
  <service name="WCFS.Service1" behaviorConfiguration="SecuredBehavior">
    <endpoint address="" binding="wsHttpBinding" bindingConfiguration="SecuredWsHttpBinding"
      name="End1" contract="WCFS.IService1" />
  </service>
</services>

因此,在我的开发机器上,我正在使用此服务,证书“BasicWCFCert”存储在“我的”(个人)位置的 LocalMachine 中。

在 Azure 中发布此服务之前,我应该如何更改它?如何告诉 Service1 使用上传到 Azure 的证书之一?

4

1 回答 1

1

您是否尝试在角色配置屏幕中附加证书,如下所示?

certmgr.msc您可以通过运行并转到相关证书来获取指纹。

在此处输入图像描述

于 2012-11-14T13:36:41.457 回答