Starting an application on the server
-
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 -
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 startedThe 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
-
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
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
-
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
-
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
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
-
It is possible but not advisable.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
It is possible but not advisable.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
-
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
-
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