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.
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.