Running from a network share

samshiell

Member
Joined
Oct 26, 2004
Messages
10
Programming Experience
10+
Hi

OK, I know this has been discussed everywhere but I'm fairly new to .NET and am confused.

I've written a windows forms application that I want to install on a network share for others to use. It fails when running from the network share because of a security error.

I've read that I can use mscorcfg.msc to configure the trust level, but the question is:-
If I run this and configure it from my PC will this enable users from their PC's to run the app, or do I need to run it from each client PC.

Thanks
Sam
 

TPM

Well-known member
Joined
Dec 7, 2004
Messages
623
Location
CA
Programming Experience
3-5
I belive you'd need to do it on every machine.

TPM
 

oldbear

Member
Joined
Feb 27, 2006
Messages
19
Location
UK
Programming Experience
5-10
Hi

The problem lies with the fact that network shares don't run with full trust in the Machine policy for Code Access Security. You'd need to use CASPOL tool to alter this, creating a new code group for your app giving it full trust.

CASPOL is command line, and can be run from scripts and bat files. A good way to make all machines able to use tyour app would be to place the script in a Group Policy for Active Directory, so that it's applied as users log on or the machine is rebooted (according to which type of policy).

Hope this helps

Chris Seary
 
Top Bottom