我在嘗試讓我的WCF客戶端和服務器彼此通話時出現此錯誤。WCF錯誤:「X.509證書CN = localhost鏈式構建失敗...」
The X.509 certificate CN=localhost chain building failed. The certificate that was used has a trust chain that cannot be verified. Replace the certificate or change the certificateValidationMode. A certificate chain processed, but terminated in a root certificate which is not trusted by the trust.
如果關閉SSL證書,一切正常。
太棒了,它現在完美。你說得對,我正在使用自簽名證書。修復此錯誤的另一關鍵技巧是使用Microsoft Service Configuration Editor在app.config中將「NegotiateServiceCredential」切換爲「false」。 – Contango 2010-11-23 16:18:37
請原諒我的無知 - 這條線應該放在客戶端還是服務器端?並在哪個部分的app.config? – 2010-12-27 12:38:36
@Shaul節是serviceBehaviors/behavior/serviceCredentials/clientCertificate您應該將此添加到服務器的app.config – 2010-12-27 14:37:26