I worte a method with PrincipalPermissionAttrubute then i run this method but i get an exception - security exception.
It happen cause i dont know who is the principal that running. I try to get the current principal by
Thread.GetCurrntPrincipal()
but i have a casting problem.
My question is how i know the principal who running and then i know what to define in name and role in PrincipalPermissionAttribut
Thanks a lot..