【问题标题】:IIS/WCF client certificate to user one-to-one mapping & internal server errorIIS/WCF 客户端证书到用户的一对一映射和内部服务器错误
【发布时间】:2014-01-27 09:54:52
【问题描述】:

我已为我的 WCF 服务启用客户端证书身份验证,包括 map-client-certificate-to-windows-account:

<serviceCredentials>
  <clientCertificate>
    <authentication mapClientCertificateToWindowsAccount="True"/>

在 system.webServer 配置中,我配置了以下映射:

<authentication>
  <iisClientCertificateMappingAuthentication enabled="true" oneToOneCertificateMappingsEnabled="true">
    <oneToOneMappings>
      <add enabled="true"
           userName="TestUser"
           password="CLEARTEXT_PASSWORD_FOR_DEVELOPER_TESTING"
           certificate="BASE64_ENCODED_CERTIFICATE"/>

但是,当调用该服务时,我得到的只是 Unhandled Exception: System.ServiceModel.ProtocolException,因为服务器正在回答 500.19 Internal Server Error - 暗示我的配置无效。

如果我删除映射并将客户端证书验证减少到:

<serviceCredentials>
  <clientCertificate/>

“正常”客户端证书验证工作正常。所以我的证书映射配置肯定有问题。我已按照教程进行操作 - 我做错了什么?

【问题讨论】:

    标签: c# wcf iis ssl


    【解决方案1】:

    天哪,刚刚发现问题:更改:

    <section name="iisClientCertificateMappingAuthentication" overrideModeDefault="Deny" />
    

    到您的 IIS 的 applicationHost.config 中的 Allow

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-01-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多