Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net HTTPS上的WCF绑定是消息级别的安全性_.net_Wcf_Wcf Binding_Wcf Security - Fatal编程技术网

.net HTTPS上的WCF绑定是消息级别的安全性

.net HTTPS上的WCF绑定是消息级别的安全性,.net,wcf,wcf-binding,wcf-security,.net,Wcf,Wcf Binding,Wcf Security,我有一个通过HTTP的WCF服务,具有以下绑定: <basicHttpBinding> <binding name="RegistreReferenciaBinding"> <security mode="Message"> <message clientCredentialType="Certificate" /> </security> </binding

我有一个通过HTTP的WCF服务,具有以下绑定:

<basicHttpBinding>
    <binding name="RegistreReferenciaBinding">
        <security mode="Message">
            <message clientCredentialType="Certificate" />
        </security>
    </binding>
</basicHttpBinding>

第三方服务正在连接到此服务,现在此第三方需要HTTPS连接

问题是我需要在消息级别维护安全性,以便与第三方服务兼容

要恢复这种情况,我需要做的是将服务配置为HTTPS兼容,无需客户端证书,同时在消息级别维护安全性

使用相同的配置但通过HTTPS运行此服务需要什么配置

更新:

我尝试使用以下配置:

<basicHttpBinding>
    <binding name="RegistreReferenciaBinding">
        <security mode="Transport" />
    </binding>
</basicHttpBinding>
<basicHttpBinding>
    <binding name="RegistreReferenciaBinding">
        <security mode="TransportWithMessageCredentials">
            <message clientCredentialType="Certificate" />
        </security>
    </binding>
</basicHttpBinding>

但使用此配置,第三方服务无法连接,因为消息级别没有安全性

从我在Wireshark捕获的消息中看到的情况来看,第三方服务使用的是SOAP 1

此配置的错误消息为:

<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode>s:MustUnderstand</faultcode>
<faultstring xml:lang="es-ES">El destinatario de este mensaje no entendió el encabezado 'Security' del espacio de nombres 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', por lo que el mensaje no se procesó. Este error suele indicar que el remitente del mensaje habilitó un protocolo de comunicación que el destinatario no puede procesar. Asegúrese de que la configuración del enlace del cliente es coherente con el enlace del servicio. </faultstring>
</s:Fault>
</s:Body>
</s:Envelope>

s:我必须明白
目的地不应是“安全”或“名义安全”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd”他说。这是一个错误,因为没有任何程序可供选择。为客户提供一致的服务。
更新2

我还尝试了以下配置:

<basicHttpBinding>
    <binding name="RegistreReferenciaBinding">
        <security mode="Transport" />
    </binding>
</basicHttpBinding>
<basicHttpBinding>
    <binding name="RegistreReferenciaBinding">
        <security mode="TransportWithMessageCredentials">
            <message clientCredentialType="Certificate" />
        </security>
    </binding>
</basicHttpBinding>


然后又失败了。

你尝试了什么,出现了什么问题?我已经按照@nvoigt的要求更新了帖子,更新了更多关于“TransportWithMessageCredential”的信息?我也尝试了,但也失败了。我使用的配置是在第二次更新中。您有比“它失败”更多的信息吗?可能是错误信息?