Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 03, 2012 06:41 AM by Peter pi - MSFT
Jan 31, 2012 01:53 PM|LINK
Anybody can give me basic example to authenticate WCF Webservices using username and password , I am using .net 4.0.
Thanks in Advance
Jan 31, 2012 02:16 PM|LINK
Check this tutorials -
Jan 31, 2012 03:18 PM|LINK
Can you provide me some other examples in details plzzzzzzzzzz
Feb 03, 2012 06:41 AM|LINK
On the client side, store the client identification (e.g: username&Password) in the custom message headers by using OperationContext.Current.OutgoingMessageHeaders property. and on the server side, you can get this custom message header by using OperationContext.Current.IncomingMessageHeaders
property. then you can validate the client identification before calling WCF service methods. For more about this, Please check this article to get help.
You can also use Soapheader to store your username and password in the request soap message and then on the on the server side, you can extract this Soapheader value using messageInspector, for more about this, check this article.
Here is a similar post to which you can refer.