I am new to authentication and authorization concepts. I wrote an authenticate method in my wcf servcice. Methods in wcf service will get called only by authenticated users with specific roles. How does the security context automatically get loaded before each request to wcf service?

1

There are 1 best solutions below

2
On

Since you are looking to reach the authenticated identity, then the following link should be helpful:

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

EDIT: If you want to automate this, you should write a wrapper for your service host (i.e: a class that inherits from ServiceHost) to encapsulate that inside your service host rather than having to write it over and over again.