0
votes

I have simple WCF Service Service1 with the following config:

<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>

So on my development machine I'm using this service with certificate "BasicWCFCert" stored in LocalMachine in "My" (Personal) location.

How should I change it before publishing this service in Azure? How can I tell Service1 to use one of certificates uploaded to Azure?

1
Please specify if you're using a Cloud Service or a Web SiteSandrino Di Mattia

1 Answers

1
votes

Have you tried attaching the cert in the role configuration screen as show below?

You can get the thumbprint by running certmgr.msc and going to the relevant certificate.

enter image description here