0

I've created an assembly that needs to run from a network share for use with AutoCAD. The code runs fine when called from AutoCAD on the local PC, but when called from the network share it throws a System.Security.SecurityException exception. I've done some research and tried setting the network share to full trust using caspol but it still doesn't work. Looking at the trace, it seems to error when calling a method from one of the AutoCAD asssemblies also present on the share.

How can I set it so that all the assemblies on the share run?

reuben
  • 3,360
  • 23
  • 28
Richard Banks
  • 2,946
  • 5
  • 34
  • 71
  • 2
    Does any of the information here help? http://stackoverflow.com/questions/507669/trusting-an-assembly-located-on-a-network-share – reuben Jul 09 '12 at 08:41
  • Provide more information and possibly a test case. This is tricky. Is the network share trusted? – TomTom Jul 09 '12 at 08:47
  • @reuben thanks but it doesnt. Ive set the share to full trust and it makes no difference – Richard Banks Jul 09 '12 at 08:52
  • @TomTom. I used caspol to set the share to full trust but it didnt make any difference. – Richard Banks Jul 09 '12 at 08:55
  • This doesn't necessarily solve the root problem, but is it a hard requirement that the assemblies be loaded from the share? Is it possible to have the first library loaded from the share arrange for / copy all of its dependencies to a temp folder on the local PC, and load the local copies? – reuben Jul 09 '12 at 09:23

1 Answers1

0

Copy it locally every time it is loaded. Either that or read it from the network into a byte array and load it from memory.

RepDbg
  • 149
  • 1
  • 4