2014-03-13 21 views
0

我們的azure web應用程序已將https端口443與我們的站點證書一起使用,在此webrole中有一個WCF服務,該服務具有使用我們的證書進行身份驗證的HTTPS端點(單向ssl),這個相同的服務需要一個額外的https端點來支持使用我們的證書和第三方證書的雙向認證。我們已經上傳了證書,更新了服務定義文件,並添加了一個我們希望能夠工作的端點,但是在測試中我們得到的錯誤是:服務'SslRequireCert'的SSL設置與IIS的'None'不匹配」。爲Azure Web角色中的WCF端點添加其他SSL行爲

,這樣做的工作的終點是:https://environemnt.application.com/Services/Service.svc 生成錯誤的端點:https://environment.application.com/Services/Service.svc/twa

關鍵的要求是,它是HTTPS,端口443,在上述新的端點,而不會改變的SSL行爲角色的其餘部分,我已經看到了改變IIS配置的條目或者使用角色編輯器來添加Https輸入端點,但是因爲我們已經使用我們的站點證書在端口443上有一個Https輸入端點,所以我不想改變/影響整個角色。

如果有幫助的服務消耗的MTOM WCF服務編碼的SOAP 1.2消息

以下是我們已經進入了新的價值,我還需要什麼呢?

<behaviors> 
<serviceBehaviors> 
    <behavior name="SSLServiceBehavior"> 
    <serviceMetadata httpsGetEnabled="true" /> 
    <serviceDebug includeExceptionDetailInFaults="true" /> 
    <dataContractSerializer maxItemsInObjectGraph="2147483647" /> 
    </behavior> 
</serviceBehaviors> 
<endpointBehaviors> 
    <behavior name="OneWayAuthEndpointBehavior"> 
    </behavior> 
    <behavior name="TwoWayAuthEndpointBehavior"> 
     <endpointDiscovery enabled="true"></endpointDiscovery> 
     <clientCredentials> 
     <clientCertificate findValue="thumprint..." storeLocation="LocalMachine" storeName="CertificateAuthority" x509FindType="FindByThumbprint" /> 
     </clientCredentials> 
    </behavior> 
</endpointBehaviors> 
</behaviors> 
<services> 
<service behaviorConfiguration="SSLServiceBehavior" name="Service"> 
    <endpoint address="" behaviorConfiguration="OneWayAuthEndpointBehavior"binding="wsHttpBinding" bindingConfiguration="HttpsMtomOneWay" contract="ITestService" /> 
    <endpoint address="twa" behaviorConfiguration="TwoWayAuthEndpointBehavior" binding="wsHttpBinding" bindingConfiguration="HttpsMtomTwoWay" contract="ITestService"/> 
</services> 
<bindings> 
<wsHttpBinding> 
    <binding name="HttpsMtomOneWay" messageEncoding="Mtom"> 
    <security mode="Transport"> 
     <transport clientCredentialType="None" /> 
    </security> 
    </binding> 
    <binding name="HttpsMtomTwoWay" messageEncoding="Mtom"> 
    <security mode="Transport"> 
     <transport clientCredentialType="Certificate" /> 
    </security> 
    </binding> 
</wsHttpBinding> 
</bindings> 

感謝你多少

回答

0

通過這些步驟修正:

  • 新增serviceCredentials.serviceCertificate(CERT細節我們CERT)的服務行爲
  • 淘汰端點行爲定義
  • 將HttpsMtomTwoWay綁定更改爲securityMode =消息

現在消息處理程序處理身份驗證交換和外部證書驗證,然後傳遞到傳輸端點,我們不需要混淆站點範圍的SSL或端點設置。經過多方第三方測試和驗證。

相關問題