Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

  • 11 months later...
Guest Deleted member 22320
Posted
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!
  • *Gurus*
Posted

.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.

MVP, Visual Developer - .NET

 

Now you see why evil will always triumph - because good is dumb.

 

My free .NET Windows Forms Controls and Articles

  • *Gurus*
Posted

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

Guest Deleted member 22320
Posted
Sweet thanx for the tip.
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...