Am I under Full trust Policy?

  • Thread starter Thread starter Nicholas Paldino [.NET/C# MVP]
  • Start date Start date
N

Nicholas Paldino [.NET/C# MVP]

Ram,

If you need to make sure that your assembly, class/structure or method
needs full trust, then you can attribute the appropriate item with the
PermissionSetAttribute, like so:

// Require full trust for the assembly.
[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name =
"FullTrust")]

However, I would wonder why you need to do this. If you are trying to
see if you have permissions to perform a certain action, I would say that
you should request the specific permission and see if you can do it, and
then degrade gracefully if you can not.

Hope this helps.
 
Hi,
I want to determine if my application is running under level of trust: 'full
trust'. How can I do it?
Regards,
Ram.
 
Back
Top