简体   繁体   中英

NetNamedPipeBinding and username/password authentication

I have a WCF service that I expose using different endpoints, one of which uses NetNamedPipeBinding . The other endpoints use a custom username/password validator to authenticate users, but as far as I can tell, this is not supported by NetNamedPipeBinding .

How can I add a custom username/password authentication mechanism to a NetNamedPipeBinding with minimal impact on other endpoints?

With NetNamedPipeBinding has almost no security, since it only works if you are on the same machine. There is only transport level security.

http://msdn.microsoft.com/en-us/library/ms731699.aspx

I solved my problem by writing my own custom behavior. I read the article " Extending WCF with Custom Behaviors " which helped me write a message inspector which appends the username and password as message headers on the client side and verifies these on the service side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM