Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 10th, 2004, 11:41 AM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default invoke .exe from webservice on server

Hello Everyone,

Is there a way to invoke a .exe or .bat using parameters passed by client to the web service.

For example, a client clicks on a function in a webservice with XYZ as parameter. The function calls notepad.exe with XYZ as parameter. The webservice invokes notepad.exe with XYZ as parameter.

I tried to use :

            Process MyProcess = new Process();
            MyProcess.StartInfo.FileName = "notepad.exe";
            MyProcess.StartInfo.UseShellExecute = false;
            MyProcess.StartInfo.CreateNoWindow = true; MyProcess.StartInfo.RedirectStandardInput = true;

            MyProcess.StartInfo.RedirectStandardOutput = true;
            MyProcess.Start();

but it doesnt seem to work.

Please let me know if you have insight regarding this problem.

Thanks in advance
 
Old November 11th, 2004, 09:28 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What is your goal with this? Are you using notepad purely as an example of an .exe to launch?
 
Old November 11th, 2004, 03:19 PM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes, I was just trying to invoke notepad.exe as an example.
Now I am able to do it with the same code. However, I do have one more question

If my webservice runs an exe, and lets say the output of running that .exe is an html file, how do I redirect the html file ( on the server ) to the client's browser.
 
Old January 17th, 2005, 08:10 AM
Registered User
 
Join Date: Jan 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also having the same problem. I want to invoke an exe on the web server machine from a client web page. How did you get it working ?






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to INVOKE any WS on server by WS on client ? Abhinavnaresh ASP.NET 2.0 Professional 1 April 4th, 2008 01:09 PM
problem printing with Report Server webservice misterC Crystal Reports 0 February 3rd, 2006 02:27 PM
Webservice as .exe geyik .NET Web Services 7 June 6th, 2004 04:22 AM
Exe Server without using ATL science_daan Visual C++ 0 April 6th, 2004 05:20 AM
Exe Server without using ATL science_daan C++ Programming 0 April 6th, 2004 01:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.