Running program from network drive

vnarod

Regular
Joined
Mar 22, 2002
Messages
84
I can run a program from my local machine but when I try to run the same program from network drive I get security error. I am not 100% sure but it looks like the error occurs when I try to connect to a database.

"The application attempted to perform an operation not allowed by security policy. The operation requires the SecurityException. To grant this application the required permission please contact your system administrator or use .Net security policy administration tool".

What should I change?
 
Anyone have any ideas? i'm sure many ppl are having this issue.. There has got to be a way for your programs to run on a networked drive, everything else does!
 
.NET code access security prohibits things running from network shares from performing several types of functions, including disk and database access.

To grant permission, go to Control Panel -> Administrative Tools -> .NET Framework Configuration. Choose Configure Code Access Security, then Adjust Zone Security. Increase the Local Intranet zone to full trust.
 
Strictly speaking you might want to trust just that assembly, not the entire Local Intranet zone. Of course this all depends on how much you trust your particular environment.

Control Panel -> Administrative Tools -> .NET Framework Configuration -> Increase Assembly Trust
 
I have also found out from the MSDN help desk that in the Configuration tool you can make a windows installer file that will setup the the configuration you need to make your program work.

All you have to do is bootstrap the .msi file to your initial setup project.

Just thought some of you might have been interested.
 
Back
Top