Author: newbie2C# | Posted on: 9/7/2009 11:26:45 AM | Views : 1014

 I am trying to get the PrincipalPermission attribute to work.  I seem to be having issues with the namespaces and/or it not being in scope.
This is what i tried first:
using System; using System.Web; using System.Web.Security; [PrincipalPermission(SecurityAction.Demand, Authenticated=true)] protected void myEventHandler() { code } Error said "The type or namespace "PrincipalPermissionAttribute" could not be found(are you missing using directive or assembly reference?) 

I tried to add this using statement hoping it would correct things, but I then got the same error for Permissions in this using directive and for the original location in the code:
               using System.Web.Security.Permissions;
I also tried to fully quallify the name in the attribute to stop this ...

Go to the complete details ...