[PrincipalPermission(SecurityAction.Demand, Role = "ValidRole")]
public partial class CustomerAdd : System.Web.UI.UserControl
{....
}
When I try the above code, I do not get the compile time error and the permissions are not applied. I am UNABLE to execute any of the code methods even for valid Roles. Even for valid roles, I get permission denied error.
This works for method level declaration but does not work for class level declaration.
Please let me know. Thanks
I ran into this problem last week and the only answer I found that make sense is:
Did some tests with ASP.NET Membership/Role providers and I can definitly tel that the user calling the constructor and the method are diffrent.