Re: Strong Name Assembly

From: Hernan de Lahitte (hernan_at_lagash.com)
Date: 03/02/04


Date: Tue, 2 Mar 2004 11:05:36 -0300

Unfortunatelly, just strongnaming your assemblies won't solve your problem.
You will have to modify the security policy as well.
To modify the polcy to trust a specific strong name by using the Microsoft
.NET Framework Configuration you have to follow this steps:
  1.. Right click on All_Code (Machine policy level) , and select New
  2.. Create a new code group for your strong name, and hit next
  3.. Select a strong name membership condition from the drop down box
  4.. Hit the import button, and select your assembly. The configuration
tool will import your public key. If you want to trust everything you sign
with this key, leave the name and version boxes unchecked
  5.. Select the FullTrust permission set. (A better way might be to use a
custom named permissionset with only your required permissions).
If you don't want to force every user to change its security policy
manually, you can use several deplyment options.
Here we have some of them:

a) Creating an MSI deployment package with required Policy settings and
pushing it across the corpnet via SMS deployment.
b) Using Group Policy mechanism to do basically the same.
c) Making sure all the corp machine run at logon time some script that
configures the policy.

-- 
Hernan de Lahitte
Lagash Systems S.A.
http://weblogs.asp.net/hernandl
"Roman" <anonymous@discussions.microsoft.com> wrote in message
news:4c8101c3ffdf$1f87a8c0$a501280a@phx.gbl...
> My Windows Forms Application loads an assembly,
> AppDomain.CurrentDomain.Load(assemblyName),from the web.
> The loaded assembly interacts with excel. Normally, I am
> getting security exception. To aviod getting the exception
> I would have to chenge the security policy on the local
> system. My question is: if I put a strong name in my
> assembly would it allow me to interact with excel without
> having to set the secirity policy on the system. The
> reason is that I shouldn't force the users to midify their
> security setting specifically for my application.