WCF分布式開發常見錯誤(24)

來源:互聯網
上載者:User

WCF分布式開發常見錯誤(24):Could not establish trust relationship for the SSL/TLS secure channel with authority

使用傳輸安全模式,認證建立SSL,宿主連接埠認證配置完畢,但是客戶調用服 務出錯。

【1】錯誤資訊:

Could not establish trust relationship for the SSL/TLS secure channel with authority 'computer:9001'.

不能和授權電腦為 SSL/TLS 安全通道建立信任關係.

WCF中文論壇問題串連:http://social.microsoft.com/Forums/zh- CN/wcfzhchs/thread/1591a00d-d431-4ad8-bbd5-34950c39d563

錯誤截圖:

【2】配置資訊:

2.1服務端配置:

服務端設定認證,不採用用戶端安全認證。安全方式是傳輸安全。服務端配 置資訊如下:

<services>
<service behaviorConfiguration="WCFService.WCFServiceBehavior"  name="WCFService.WCFService" >
<endpoint
address="WCFService"
binding="wsHttpBinding"
bindingConfiguration="BasicWithTransport"
contract="WCFService.IWCFService">
</endpoint>
<endpoint address="mex" binding="mexHttpsBinding"  contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="https://computer:9001/"/>
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="WCFService.WCFServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<serviceCertificate  storeName="My"   x509FindType="FindBySubjectName" findValue="WCFHTTPS"  storeLocation="LocalMachine"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="BasicWithTransport">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</wsHttpBinding>
</bindings>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.