tags:

views:

30

answers:

1

I have a WCFservice named IEnvironmentService. This service provides some unsecure methods. I have to protect some methods in this service. In order to protect this methods I want to use windows identity. So other than the specific windows identity service methods cannot be callable. How can I achieve this. thanks.

+2  A: 

You can do this in your service implementation (you can't do anything about this on contract):

[PrincipalPermission(SecurityAction.Demand, Role = @"DOMAIN\group")]
public void DoSomethingInsecure()
{
    // do stuff
}
Rubens Farias