WCF Distributed Development Common errors (22)

Source: Internet
Author: User

WCF Distributed Development Common error: The caller is not authenticated ... How to set up a trustworthy certificate for WCF in XP systems

I encountered an error while doing WCF security programming in the XP Professional Edition system. The secure authentication method used is: UserName and Password Security binding protocol:. Wshttpbinding. I will describe in detail how to set up a trusted certificate in an XP environment. Because this error is directly related to the certificate, for many of the XP environment for WCF programming learners, should have a good reference value. Error message: The caller is not authenticated by the service. Service authentication caller failed. XP System Configuration Certificate also seems to be more cumbersome, you like the Windows Server series, we can build a CA to control the status of the certificate. Although we can install it ourselves. But it's too much trouble. Just like applying for a free certificate. Just for personal learning, everything wants to be simple and quick to learn WCF's safe programming. I also use a certificate made by MakeCert.

Server certificate set, message Safe mode. I searched for the information. As follows:

The caller wasn't authenticated by the SERVICE-WCF security using ...

The caller wasn't authenticated by the service

Caller wasn't authenticated by the service

Wcf-the caller was wasn't authenticated by the service

Wcf-tcp+cert "The caller wasn't authenticated by the service." But it doesn't help, and a lot of the same problems are not solved. Issues I also put in WCF Chinese and English forum:

Http://social.microsoft.com/Forums/zh-CN/wcfzhchs/thread/cd3f0247-a1b4-43c0-af1c-7b0e609b1e3b

HTTP://SOCIAL.MICROSOFT.COM/FORUMS/ZH-CN/WCF/THREAD/3A5417C6-FDD1-47D7-9757-EBC8EDE7AFFB.

"1" Problem Description: Screenshot of error message:

The same way to use usernamepasswordvalidator verification. Wshttpbinding, this binding supports the WS security specification. The server-side certificate must be started. WCF Distributed Development Common error: Unable to the open its Ichannellistener. The distributor failed to open the listener and has encountered a problem. The cause of the error at that time was that the server-side certificate was not enabled.  After this error is corrected, start the service again, add the service reference, generate the client agent and other related files. The certificate configuration information for the service behavior is as follows:

<servicebehaviors>
<behavior name= "Wcfservice.wcfservicebehavior"
<se            Rvicemetadata httpgetenabled= "true"/>
<servicedebug includeexceptiondetailinfaults= "false"/>
<servicecredentials>
<servicecertificate x509findtype= "Findbysubjectname" FindValu E= "MyServer" storelocation= "CurrentUser"/>
<clientcertificate
<authentic ation certificatevalidationmode= "None"/>
</clientcertificate>
<usernameauth Entication usernamepasswordvalidationmode= "Custom" customusernamepasswordvalidatortype= " Wcfservice.myusernamepasswordvali dator,wcfservice "/>
</servicecredentials>
</beh Avior>
</servicebehaviors>

This sentence is the server to query the basis of the certificate: <servicecertificate x509findtype= "Findbysubjectname" findvalue= "MyServer" storelocation= " CurrentUser "/>. In the CurrentUser location, locate the certificate for the subject myserver.

The use of X509 certificates complies with the WS Security specification. Certificate is a typical application of asymmetric encryption algorithms. As for how to obtain asymmetric encryption, certificates, I have in the previous series of articles have been detailed, need to refer to the following: WSE3.0 Building Web Services Security (2): Asymmetric encryption, public key, key, certificate, signature differences and contacts and X.509 certificate acquisition and management

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.