Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Class process fails running from network drive ??

Class process fails running from network drive ??

Scheduled Pinned Locked Moved Visual Basic
questionsysadminsecurity
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    edmonson
    wrote on last edited by
    #1

    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 ?

    D 1 Reply Last reply
    0
    • E edmonson

      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 ?

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • D Dave Kreskowiak

        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

        E Offline
        E Offline
        edmonson
        wrote on last edited by
        #3

        Thank's for the answer. But, What must i do to make my assembly full trusted ? Sorry for my inexperience with security policies.

        D 1 Reply Last reply
        0
        • E edmonson

          Thank's for the answer. But, What must i do to make my assembly full trusted ? Sorry for my inexperience with security policies.

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups