Click here to Skip to main content
15,567,466 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have built a test WCF Service using article CREATE RESTful WCF Service API Using POST: Step By Step Guide[^]

The reason I did this is because I need to provide service for a 3rd party to post data to.
At the moment the service does not have any authentication at all. And I need to add this in. I have read various articles and cannot find anything that quite fits my requirements.
The articles I have read mention passing the user credentials in the WebRequest header, but I don't want to do it this way.

I want the client to be able to enter the WebRequest Credentials (req.Credentials = new NetworkCredentials("username", "password"); But I can't find how I read that in in the service and then authenticate the passed credentials.

Any Ideas? Or are there any articles that explain how to do this?

Thanks in advance.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900