views:

164

answers:

2

I have a handful of assemblies on a network share. There is another application that uses reflection to load these and execute some code. The method that needs to be executed makes a web request, so I am getting a security exception when I try to do that. I have tried signing the assemblies, but that doesn't work. Does anyone have any thoughts on how I can get this to work?

+2  A: 

Use the caspol.exe utility. You can trust a single assembly or a network share.

Mehrdad Afshari
is there anyway to do this via code by chance? The application the loads these assemblies will be running on several computers in the network. That is why the assemblies are on a share
Joe
Not by untrusted .NET code. CAS would be essentially useless if you could do that! It's like being able to grant admin permissions from a non-admin user.
Mehrdad Afshari
That is what I thought. I guess I was hoping I was wrong. :)
Joe
+2  A: 

If you want a GUI alternative to caspol, and have the .NET SDK installed, there is a control panel also installed called "Microsoft .NET Framework 2.0 Configuration". Caspol does the equivalent of adding a "Runtime Security Policy"

Lou Franco