Class process fails running from network drive ??
-
I'm running my application from a network drive. My framework is configured to grant all_codes security permissions to Everithing. Applications running fine, including accessing local ports, system file,... but if i use the class process, framework tell me that security policies do not permit this operation. Below a code brief.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MyProcess = New Process 'This line is security policy violation? MyProcess.StartInfo.UseShellExecute = False MyProcess.StartInfo.CreateNoWindow = True MyProcess.StartInfo.RedirectStandardOutput = True ...
How can i solve ? -
I'm running my application from a network drive. My framework is configured to grant all_codes security permissions to Everithing. Applications running fine, including accessing local ports, system file,... but if i use the class process, framework tell me that security policies do not permit this operation. Below a code brief.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MyProcess = New Process 'This line is security policy violation? MyProcess.StartInfo.UseShellExecute = False MyProcess.StartInfo.CreateNoWindow = True MyProcess.StartInfo.RedirectStandardOutput = True ...
How can i solve ?This error is telling you your assembly, running from the network, doesn't have FullTrust permissions on the machine. You configured permissions for Everything, not FullTrust. "Everything" just gives you Execute permission. The Process class requires that the calling assembly (your code) have FullTrust permission to call it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
This error is telling you your assembly, running from the network, doesn't have FullTrust permissions on the machine. You configured permissions for Everything, not FullTrust. "Everything" just gives you Execute permission. The Process class requires that the calling assembly (your code) have FullTrust permission to call it.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Thank's for the answer. But, What must i do to make my assembly full trusted ? Sorry for my inexperience with security policies.
Well, I'd love to tell you, but it wouldn't do you any good because what you do depends on your network environment, its configuration, policies you have in place (if any), your app's requirements, if you have a certificate, if you're going to use this certificate for future apps, ... Basically, that's what all that documentation is for. There's a bunch of options to explore to do this. In a nutshell, you have to get the machines to trust your code, either the source folder, or registered assemblies, or certificate-based trust. How you do that depends on network environment and any policy management setup you have.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007