System.Diagnostics.Process is not working in http web application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bremanand
    New Member
    • Jul 2006
    • 29

    System.Diagnostics.Process is not working in http web application

    Hi my asp.net web application having one button which has the following code in its click event to open an .exe....

    System.Diagnost ics.Process pro = new System.Diagnost ics.Process();
    pro.StartInfo.W orkingDirectory = "./";
    pro.StartInfo.F ileName = "windraw1.1.exe ";
    pro.Start();

    its is working fine if it is file system project. But in http type of project it doesnt work. also there wasnt any exceptions too. Also i have changed my virtual directory permissions to "scripts and Executables". but still it doesnt... plz let me know the solution for this...
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    That code would attempt to run that program on the server.
    Process.start doesn't always generate an exception.
    I had it try and run a file with no association and it threw no exception because the file existed, it just had nothing it could do with it.

    Comment

    • Bremanand
      New Member
      • Jul 2006
      • 29

      #3
      Originally posted by Plater
      That code would attempt to run that program on the server.
      Process.start doesn't always generate an exception.
      I had it try and run a file with no association and it threw no exception because the file existed, it just had nothing it could do with it.

      ok..Actually that .exe consists one vb.net winform. when i run this in http.. the windraw1.1.exe is created in task manager process.. but the form is not opening.
      In file system the User type in task manager is "Administra tor" which works fine...but in http, User type in task manager is "Network service" which is not opening the form.
      if you give me a solution,that will be useful for me. Thanks in advance.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        It looks like you will need to get the process to run under different credentials (probably that of the admin).
        I know it can be done, but I have never done it unfortunatly.

        Comment

        • Bremanand
          New Member
          • Jul 2006
          • 29

          #5
          Originally posted by Plater
          It looks like you will need to get the process to run under different credentials (probably that of the admin).
          I know it can be done, but I have never done it unfortunatly.

          plz tell me how to do this.. should we do anything with IIS????

          Comment

          • tvaughan77
            New Member
            • Jan 2008
            • 6

            #6
            Originally posted by Bremanand
            plz tell me how to do this.. should we do anything with IIS????
            Hi,

            Did you ever figure this out? I'm having essentially the same problem and I'm wondering if you ever found a solution...

            TIA,
            Tom

            Comment

            Working...