I have implemented an userNameAuthentication and custom AuthorizationPolicy for my WCF service, and works fine. What I would like to do is exclude some methods from authentication/authorization process and make them accessible to anonymous users.
Here is sample code:
// Service uses webHttpBinding
public class Service1 : IService1
[PrincipalPermission(SecurityAction.Demand, Role = "ADMIN")]
public string DoSomething(string val)
// I want this to be accessible to anonymous users, bypass authentication/authorization process
public int AddValues(int a, int b)
return HelperFuncs.Add(a, b);
How can I achieve this?
Thanks in advance.
View Complete Post