Wcf IIS 7中具有安全模式TransportWithMessageCredential的WsHttpBinding不工作

Wcf IIS 7中具有安全模式TransportWithMessageCredential的WsHttpBinding不工作,wcf,iis-7,ssl,wshttpbinding,Wcf,Iis 7,Ssl,Wshttpbinding,我们当前正在将WCF服务从IIS 6迁移到IIS 7。该服务包含一些用于内部流的非SSL端点,以及一些使用SSL保护的公开端点 使用wsHttpBinding和security mode=“TransportWithMessageCredential”实现公共安全端点。绑定内容如下: <wsHttpBinding> <binding name="CustomSecurityBinding"> <security mode="TransportWithMe

我们当前正在将WCF服务从IIS 6迁移到IIS 7。该服务包含一些用于内部流的非SSL端点,以及一些使用SSL保护的公开端点

使用wsHttpBinding和security mode=“TransportWithMessageCredential”实现公共安全端点。绑定内容如下:

<wsHttpBinding>
  <binding name="CustomSecurityBinding">
    <security mode="TransportWithMessageCredential">
      <message clientCredentialType="UserName" />
    </security>
  </binding>
</wsHttpBinding>
迄今已采取的步骤:
  • 在IIS 7中重新安装WCF扩展(ServiceModelReg.exe-r-y)
  • 为主机启用了https协议,向主机添加了自签名证书
  • 在wcf配置中使用dns/标识设置
  • 已将基址添加到wcf服务配置

在谷歌搜索了两个小时并试图实现这一点后,我问您最后的希望:有人知道IIS 7的这种奇怪行为吗?

您是否验证了SSL绑定是在applicationHost.config(%windir%\system32\inetsrv\config\schema\IIS\u schema.xml)中配置的HTTP.sys存储区是否包含有效的证书以及绑定的存储区名称?其次,真正的错误可能会被400错误掩盖,您是否尝试在配置中更改wsHttpBinding以将maxBufferPoolSize和maxReceivedMessageSize增加到一些非常高的值,并查看这种情况是否继续?

如何在applicationHost.config中检查SSL绑定?我在xml文件中搜索ssl,但只找到了不相关的设置。证书安装正确,在wsHttpBinding上设置maxReceivedMessageSize=“2147483647”maxBufferPoolSize=“2147483647”仍然会导致HTTP 400.0状态代码。是否看到一个部分?在它里面应该有一个绑定部分,在绑定里面应该有一个协议,它应该有很多httpsthanks,绑定缺失:)现在工作得很好!
MODULE_SET_RESPONSE_ERROR_STATUS Warning
ModuleName="ManagedPipelineHandler", Notification="EXECUTE_REQUEST_HANDLER",
HttpStatus="400", HttpReason="Bad Request", HttpSubStatus="0", ErrorCode="Der
Vorgang wurde erfolgreich beendet. (0x0)", ConfigExceptionInfo=""