How to protect a WCF service method with specific windows identity
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开发者_JAVA百科 methods cannot be callable. How can I achieve this. thanks.
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
}
精彩评论