Permission problem: works on wkstn not from server share

Rankun

Newcomer
Joined
Jan 14, 2003
Messages
17
I wrote this program that lists the system information on the "About" form.
I am not using hte msi to install, just running the exe. It works like a champ with any user on any machine if the exe is copied to the local machine, but doesn't work if anyone (including domain admins) runs it from a server share.

Code and error enclosed.

Any help is greatly appreciated!!
Thanks, Rankun
 

Attachments

Unless you changed the .net security levels, the default for network shares (local interanet) is 1 level under full trust.

I think unless your code specifies the required security level, this means .NET assumes you need the highest level and blocks your application. Also very possible that the ManagementObjectSearcher object requires the highest level of trust in order to be created.

You can check your security setting through adminstrative tools -> Microsoft>NET framework 1.1 Configuration -> Runtime security policiies -> Adust zone security -> Local intranet.

Increasing it would probably fix it for the local machine, but not for all machines. Besides the administrators might not be all that happy with increased trust ;). I think it is possible through an enterprise policy to set the permissoin for all users in a domain, but I have no idea how that works.
 
Thanks Wile! Fixed the problem for my machine, now I just need to find a group policy or something to fix the rest of the pc's on the domain.
 
If you right click on the runtime security policy node you can select the 'Create Deployment Package' entry and get the relevant settings expoted to a MSI file. This can then be deployed via group policies.
 
I actually thought about that, only problem is I don't want to install this on 3000 computers. And I can't "install" it on the server. I need to run it as an exe from a server share. Thanks again,
 
Back
Top