Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trusting a File Share for Windows Forms project

Status
Not open for further replies.

link9

Programmer
Nov 28, 2000
3,387
US
Hello all --

I am finding hit or miss information about this on Google, and I'm hoping I can just pinpoint what I need here.

My problem is simple. I have a C# windows forms project that I would like for several people here in the office to be able to run off of the network (i.e. a file server/file share).

Where I would compile the project locally, place the .exe on the network, and have users be able to run it by clicking it directly from the network drive.

However, I get security exceptions when trying. Specifically:
Code:
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.

If I copy off the .exe to their workstations, then they can run it just fine, but this is becoming cumbersome since they all have their own copies, and managing updates and such is just a pain. I'd so much rather them just be able to run it off the network, and then I only have one copy to manage.

Can anyone tell me what I need to do in order to have this work?

Thanks guys/gals :)
paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Eureka.

All along, I was thinking this policy change had to be made on the server, and as it turns out, it must be made on the workstations.

So, for future reference sake:

Start-->All Programs-->Administrative Tools-->.NET Framework Wizards-->Adjust .NET Security

Move the "Intranet Zone" to a full trust.

-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
If you have Active Directory set up, a network administrator can make that change on behalf of your users.

I haven't verified this, but I think a user can't tweak their policy unless they have local administrator rights.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top