WCF Distributed Development Common errors (27)

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.