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. Web Development
  3. ASP.NET
  4. Run an EXE in remote machine

Run an EXE in remote machine

Scheduled Pinned Locked Moved ASP.NET
csharphelpasp-net
16 Posts 6 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.
  • M madancode

    I have to run an EXE in remote machine, exe will be present in same remote machine just i have to initiate that EXE through my code. I am using ASp.Net with C# Can you help me to solve this problem by providing steps/code for this need...

    S Offline
    S Offline
    SeMartens
    wrote on last edited by
    #7

    Hi, have a look at the system.diagnostics.process class. Using this you can start an exe-file. You will need to set the user for the process. If you do not, the process will run using the ASPNET-account (or networkservice, depending on IIS version). Regards Sebastian

    It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

    M 1 Reply Last reply
    0
    • M madancode

      Thanks for the reply abhijit, Not in client machine. ExE is in separate remote system, i have to run their(File residing remote system) only

      M Offline
      M Offline
      Manas Bhardwaj
      wrote on last edited by
      #8

      madancode wrote:

      i have to run their(File residing remote system) only

      If you have all the necessary permission on the remote machine, you can use the System.Management functions to do this. Here [^]is a nice article on it.

      Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

      M 1 Reply Last reply
      0
      • M Manas Bhardwaj

        madancode wrote:

        i have to run their(File residing remote system) only

        If you have all the necessary permission on the remote machine, you can use the System.Management functions to do this. Here [^]is a nice article on it.

        Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.

        M Offline
        M Offline
        madancode
        wrote on last edited by
        #9

        But can we use System.Management in asp.net

        1 Reply Last reply
        0
        • S SeMartens

          Hi, have a look at the system.diagnostics.process class. Using this you can start an exe-file. You will need to set the user for the process. If you do not, the process will run using the ASPNET-account (or networkservice, depending on IIS version). Regards Sebastian

          It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

          M Offline
          M Offline
          madancode
          wrote on last edited by
          #10

          I have tried by giving user name and password of Remote system, in process and and in machine.config file in tag. It gives me login failure(Error would be like Login failuer:Bad user name or password), but username and password are correct.

          S B 2 Replies Last reply
          0
          • M madancode

            I have tried by giving user name and password of Remote system, in process and and in machine.config file in tag. It gives me login failure(Error would be like Login failuer:Bad user name or password), but username and password are correct.

            S Offline
            S Offline
            SeMartens
            wrote on last edited by
            #11

            Are the ASP.NET app and the exe on the same machine?

            It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

            M 1 Reply Last reply
            0
            • S SeMartens

              Are the ASP.NET app and the exe on the same machine?

              It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

              M Offline
              M Offline
              madancode
              wrote on last edited by
              #12

              No...Both are in separate system.I can able to run the EXE, while residing in same systems. But here i have to run the EXE in remote system(ExE file present in the same remote system).

              S 1 Reply Last reply
              0
              • M madancode

                No...Both are in separate system.I can able to run the EXE, while residing in same systems. But here i have to run the EXE in remote system(ExE file present in the same remote system).

                S Offline
                S Offline
                SeMartens
                wrote on last edited by
                #13

                Then the class will not work... The login is for the ASP.NET machine, not for your machine with the exe...

                It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                M 1 Reply Last reply
                0
                • S SeMartens

                  Then the class will not work... The login is for the ASP.NET machine, not for your machine with the exe...

                  It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

                  M Offline
                  M Offline
                  madancode
                  wrote on last edited by
                  #14

                  If so,How to solve this problem....

                  1 Reply Last reply
                  0
                  • M madancode

                    I have tried by giving user name and password of Remote system, in process and and in machine.config file in tag. It gives me login failure(Error would be like Login failuer:Bad user name or password), but username and password are correct.

                    B Offline
                    B Offline
                    Baran M
                    wrote on last edited by
                    #15

                    Check out this ..![^]

                    You are best person who knows about your problem. ------------------------------------------------- More pain more gain

                    1 Reply Last reply
                    0
                    • M madancode

                      I have to run an EXE in remote machine, exe will be present in same remote machine just i have to initiate that EXE through my code. I am using ASp.Net with C# Can you help me to solve this problem by providing steps/code for this need...

                      M Offline
                      M Offline
                      madancode
                      wrote on last edited by
                      #16

                      HI All, Thanks for all your helps,Now i am getting error 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))' I am using System.Management, error raises while trying to connect.

                      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