Re: Custom Principal Permission
From: Eugene V. Bobukh [MS] (eugenebo_at_online.microsoft.com)
Date: 06/26/03
- Next message: Niels Ladegaard Beck: "How do I avoid Assert()?"
- Previous message: Matjaz Ladava: "Re: SQL Integrated Security in .NET"
- In reply to: Olivier Haddad: "Custom Principal Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 26 Jun 2003 11:10:44 -0700
Not to say that I know the answer... But I have couple of hints/questions.
First, that declarative attribute has a method called CreatePermission. Is
it called when you build assemblies that use this attribute [easy to check
by injecting something like Console.WriteLine(..) into it].
Second, did you implement attribute in the same file where permission class
is implemented? If yes, then probably you'd better keep them separated,
although I don't remember exactly what problems single file solution
presents.
Third, does everything work if you add your permission and attribute
assemblies to the GAC and Policy Assembly list? [I suspect MSDN might be
just wrong here...]
-- Eugene V. Bobukh This message is provided "AS IS" with no warranties, and confers no rights. Any opinions or policies stated within it are my own and do not necessarily constitute those of my employer. ---- "Olivier Haddad" <olivier.hadad@emblaze.com> wrote in message news:ukcnvHwODHA.3020@TK2MSFTNGP10.phx.gbl... > I wrote a simple class implementing IPermission and a corresponding > attribute class deriving from SecurityAttribute. > > My permission class does not derive from CodeAccessPermission as I am not > interested in a stack walk (like PrincipalPermission). > > I didn't add the assembly to the Security Policy as MSDN states that it is > not needed for non-CAS permissions. > > Imperative permission works fine, but declarative permission is ignored. > Checking the compiled file with ILDasm and Permview revealed that no XML > permission metadata was added. > > How do I get my Security Attribute derivated class to work? > > The MSDN documentation only gives proper examples for CodeAccessSecurity > derived classes. > >
- Next message: Niels Ladegaard Beck: "How do I avoid Assert()?"
- Previous message: Matjaz Ladava: "Re: SQL Integrated Security in .NET"
- In reply to: Olivier Haddad: "Custom Principal Permission"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|