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. Starting an application on the server

Starting an application on the server

Scheduled Pinned Locked Moved Web Development
sysadminquestion
9 Posts 3 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.
  • D Offline
    D Offline
    Deques
    wrote on last edited by
    #1

    Is it really possible to start a program that resides in the server from a web application? I am using following code: using System.Diagnostics; Process startNotepad = new Process(); startNotepad.StartInfo.FileName = "notepad.exe"; startNotepad.StartInfo.UseShellExecute = true; startNotepad.StartInfo.CreateNoWindow = false; startNotepad.Start(); This works while debugging the page. I can see notepad start. But when I try it in a server I dont see Notepad, but I do see a process in task manager started

    G 1 Reply Last reply
    0
    • D Deques

      Is it really possible to start a program that resides in the server from a web application? I am using following code: using System.Diagnostics; Process startNotepad = new Process(); startNotepad.StartInfo.FileName = "notepad.exe"; startNotepad.StartInfo.UseShellExecute = true; startNotepad.StartInfo.CreateNoWindow = false; startNotepad.Start(); This works while debugging the page. I can see notepad start. But when I try it in a server I dont see Notepad, but I do see a process in task manager started

      G Offline
      G Offline
      George L Jackson
      wrote on last edited by
      #2

      The owner the process started from your web application is ASPNET. ASPNET does not have an active desktop, thus, the process will run but will not display.

      "We make a living by what we get, we make a life by what we give." --Winston Churchill

      F D 2 Replies Last reply
      0
      • G George L Jackson

        The owner the process started from your web application is ASPNET. ASPNET does not have an active desktop, thus, the process will run but will not display.

        "We make a living by what we get, we make a life by what we give." --Winston Churchill

        F Offline
        F Offline
        Fred_Smith
        wrote on last edited by
        #3

        Does that mean I could run an application (.exe) in the background (say one without a user interface) that I upload to my server using this method? Say, for example, one that sends out emails to a list I upload... How about one that wipes the server hard-disk.. eek... Fred

        G 1 Reply Last reply
        0
        • G George L Jackson

          The owner the process started from your web application is ASPNET. ASPNET does not have an active desktop, thus, the process will run but will not display.

          "We make a living by what we get, we make a life by what we give." --Winston Churchill

          D Offline
          D Offline
          Deques
          wrote on last edited by
          #4

          is it possible to make aspnet has the rights then?

          G 1 Reply Last reply
          0
          • F Fred_Smith

            Does that mean I could run an application (.exe) in the background (say one without a user interface) that I upload to my server using this method? Say, for example, one that sends out emails to a list I upload... How about one that wipes the server hard-disk.. eek... Fred

            G Offline
            G Offline
            George L Jackson
            wrote on last edited by
            #5

            If ASPNET's access is more than its default access, you are opening up your web server to some nasty security issues. There are more secure ways of doing running a process.

            "We make a living by what we get, we make a life by what we give." --Winston Churchill

            1 Reply Last reply
            0
            • D Deques

              is it possible to make aspnet has the rights then?

              G Offline
              G Offline
              George L Jackson
              wrote on last edited by
              #6

              It is possible but not advisable.

              "We make a living by what we get, we make a life by what we give." --Winston Churchill

              D 1 Reply Last reply
              0
              • G George L Jackson

                It is possible but not advisable.

                "We make a living by what we get, we make a life by what we give." --Winston Churchill

                D Offline
                D Offline
                Deques
                wrote on last edited by
                #7

                I guess it has to be a security issue, am I right?

                G 1 Reply Last reply
                0
                • D Deques

                  I guess it has to be a security issue, am I right?

                  G Offline
                  G Offline
                  George L Jackson
                  wrote on last edited by
                  #8

                  Yes, it can be a security issue. Also, you loose a lot of control of your application since you are running mulitple processes. Since your web application may have several user using your application at the same time, running several of the same local processes can be come a resource hog or cause some unforeseen conflicts. If a local process fails, how do you recover?

                  "We make a living by what we get, we make a life by what we give." --Winston Churchill

                  D 1 Reply Last reply
                  0
                  • G George L Jackson

                    Yes, it can be a security issue. Also, you loose a lot of control of your application since you are running mulitple processes. Since your web application may have several user using your application at the same time, running several of the same local processes can be come a resource hog or cause some unforeseen conflicts. If a local process fails, how do you recover?

                    "We make a living by what we get, we make a life by what we give." --Winston Churchill

                    D Offline
                    D Offline
                    Deques
                    wrote on last edited by
                    #9

                    ok, I understand now. thanks for the answer

                    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