Help! I have created a DLL file which works with a 3rd party program. When it is on my hard drive it works fine but as soon as I move it to a place on the network I get the following error message:
"Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."
Does anyone know why?
The DLL file needs to be accessed by a number of users.
Darren FormosaPosted Dec 9, 2008, 6:34 AM
Hi, thanks for the reply. I am still struggling to find a way around this problem. There are 2 DLLs I have created which are called from a 3rd party program. The DLLs are created in C-sharp and the using ILDASM I turn the C# DLL into Win32 DLLs. These work fine on my hard drive but no longer work when called from a place on the network.
One DLL is used to read the registry and another is used to access SQL Server. Do I need to put anything in the code for the security, permissions, etc or should I be able to put references in the MMC or Caspol?
The DLLs are to used by multiple people.
Thanks in advance
Dusan TkacPosted Dec 8, 2008, 10:20 AM
try to read something about "Code Access Security". Your assembly residing on local network probably runs using LocalIntranet permission set, but it requires higher trust.
You can use .Net Framework Configuration snap-in for MMC or caspol to change your Code Access Security policy.