|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I send shell-commands to the web-server in webcontrols?I'm developping a WebGUI where the user are able to create some shell-commands and add them to a joblist. 'Adding them to a joblist' means that these commands are stored in a listbox listbox_joblist then. The joblist should be executed on the webserver then. How can I send this joblist to the webserver and execute each command step by step on the webserver? Means e.g. - Writing the commands to a file on the server and execute it as a batch... - open a telnet connection to the webserver and execute the command step by step ... - etc. Do you have any ideas how this problem could be solved? You're very welcome for good advices. Thanks a lot. regards phil Phil,
I would suggest that you log your jobs in a database and have an external process handle the jobs. You could run a Windows Service written with .NET which will use Query Notifications to monitor the jobs table for updates. http://msdn2.microsoft.com/en-us/library/t9x04ed2(VS.80).aspx Then the service can run the jobs separate from the web application which is not a good place for long running jobs. You could also run a scheduled job to process the jobs table if they do not have to be run immediately. One advantage here is that web application can run with limited rights while the Windows Service can run with the necessary permissions. Just be sure only a limited set of functions can be run through this process so that your website users are not running any number of arbitrary commands on your server with elevated privileges. Brennan Stehling http://brennan.offwhite.net/blog/ Philipp Landolt wrote: Show quoteHide quote > Hello, > > I'm developping a WebGUI where the user are able to create some > shell-commands and add them to a joblist. > 'Adding them to a joblist' means that these commands are stored in a listbox > listbox_joblist then. > The joblist should be executed on the webserver then. > > How can I send this joblist to the webserver and execute each command step > by step on the webserver? > Means e.g. > - Writing the commands to a file on the server and execute it as a batch... > - open a telnet connection to the webserver and execute the command step by > step ... > - etc. > > Do you have any ideas how this problem could be solved? > You're very welcome for good advices. Thanks a lot. > > regards > phil I agree with Brennan.
I think a Windows Service is likely the best place to execute such batch jobs. The web site can communicate with the Windows Service as needed through a database or common config file. Show quoteHide quote "Brennan Stehling" <offwh***@gmail.com> wrote in message news:1166405942.982165.196540@73g2000cwn.googlegroups.com... > Phil, > > I would suggest that you log your jobs in a database and have an > external process handle the jobs. You could run a Windows Service > written with .NET which will use Query Notifications to monitor the > jobs table for updates. > > http://msdn2.microsoft.com/en-us/library/t9x04ed2(VS.80).aspx > > Then the service can run the jobs separate from the web application > which is not a good place for long running jobs. You could also run a > scheduled job to process the jobs table if they do not have to be run > immediately. > > One advantage here is that web application can run with limited rights > while the Windows Service can run with the necessary permissions. Just > be sure only a limited set of functions can be run through this process > so that your website users are not running any number of arbitrary > commands on your server with elevated privileges. > > Brennan Stehling > http://brennan.offwhite.net/blog/ > > Philipp Landolt wrote: >> Hello, >> >> I'm developping a WebGUI where the user are able to create some >> shell-commands and add them to a joblist. >> 'Adding them to a joblist' means that these commands are stored in a >> listbox >> listbox_joblist then. >> The joblist should be executed on the webserver then. >> >> How can I send this joblist to the webserver and execute each command >> step >> by step on the webserver? >> Means e.g. >> - Writing the commands to a file on the server and execute it as a >> batch... >> - open a telnet connection to the webserver and execute the command step >> by >> step ... >> - etc. >> >> Do you have any ideas how this problem could be solved? >> You're very welcome for good advices. Thanks a lot. >> >> regards >> phil >
No open/save prompt
Wizard.FinishButtonClick - launch browser AND redirect How to get GridView row from DataKey? Return Values from Popup to UserControl data field - change true/false to Yes/No Keeping 2 user controls of the same class synced How to close multiple web pages can't remove listitem from ddl in loop Item has already been added. Key in dictionary ObjectDataSource TableAdapters Point-N-Click HELL |
|||||||||||||||||||||||