WCF Distributed development common error (in): Secure Channel cannot be opened because security negotiation with the remote endpoint has
This problem is in debugging WCF Distributed Security Development Practice (12): Message security Mode custom X509 certificate authentication: message_customx509certificate_wshttpbinding. Found and put forward, I helped debug and found the solution to the problem. Sent out to share with you.
"1. Problem description":
1. Project type: IIS-managed WCF service.
2. Security type: Message Safe Mode + custom X509 certificate authentication. +wshttpbinding:message_customx509certificate_wshttpbinding
3. Client type: asp.net website.
4. Error message: Secure Channel cannot be opened because security negotiation with the remote endpoint has. This is due to absent or incorrectly specified endpointidentity into the endpointaddress to create the used. Please verify the endpointidentity specified or implied by the endpointaddress correctly the remote identifies.
The secure channel cannot be opened because security has failed to negotiate with the remote endpoint. This may be due to a missing or incorrect designation of the endpointidentity used to create the channel in EndpointAddress. Please verify that the endpointidentity specified or implied endpointaddress correctly identifies the remote endpoint.
5. Error screenshot:
"2. Problem analysis":
There are 2 possible causes for this problem:
(1) There is no server-side configuration security option.
(2) The service is not started.
There are a lot of similar problems on the web, but it doesn't help. This is an application project for 2 web types. This problem occurs easily when debugging.
"3 Solution":
Reason (1):
Check service configuration, certificate settings:
<wsHttpBinding>
<binding name= "mybindingconfigration" >
<security mode= "message" >
<transport
clientcredentialtype= "None"/>
<message
clientcredentialtype= "certificate"/>
</security>
</binding>
</wsHttpBinding>
Reason (2): Because a solution contains 2 projects, you need to ensure that the service is started. The steps are as follows:
The key to this problem is that, although you set up a certificate, here the error is that negotiation with the service endpoint failed because it is not a certificate.
is an integer-identified service that did not start, resulting in a negotiation error. You right--"debug-> starts a new instance and starts the service first."
Then in the right key-"debug->" starts a new client project instance. This single step debugging is passed.
I changed the certificate name to my local certificate, and you remember to modify the configuration file according to your own certificate name.
Reference Links:
http://social.microsoft.com/Forums/zh-CN/wcfzhchs/thread/f1d4e572-5871-48da-8dc3-8195a42f7c94