Security Exception

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Is there a way that when I install my vb.net application through an MSI that
I can have the assemblies fully trusted? Everything works fine when tell it
to trust my assembly but I need this to happen automatically when I deploy
my app. Thanks.

Chris
 
One way of accomplishing this is to sign your assembly with a strong name
and then write a custom install routine that modifies the security policy
for the machine your app is installed on. This routine will create a code
group whose membership condition is the strong name you signed your assembly
with and whose permission grant is full trust.

You will need to be running as an administrator when the install program is
run, and this will only work for client apps - web servers run under the
security settings imposed by IIS.

There's a book called ".NET Framework Security" by LaMacchia, Lange, etc.
that contains sample code that shows how to modify the machine policy. You
can use a standard install project and add a custom action to it that calls
the install routine with the security code.

If you have other security questions I would post them directly to the
dotnet.security newsgroup.
 
Back
Top