From: Ashish
Sent: den 29 augusti 2003 09:42
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] Calling a exe on remote machine

> Hi,
>
> I have a machine A which calls a webmethod on machine B which hosts the
> webservice. I want to call a EXE that is on machine C from this webmethod
> on machine B. If I use process.start() and specify the shared EXE path of
> machine C, then a security exception is thrown.

I think the exception is thrown because the webservice runs from IIS
which does not by default has previligies enough to execute code from the
network.

> I have a doubt here:
> a) IF somehow I am able to run the EXE like this, will the EXE be running
> actually on machine B or machine C. I want that EXE executes at machine C
> because this EXE prints on a printer on machine C.

And yes your doubts are tru, the exe would not execute on the
intended machine (c) but as you suspect on the callers machine (b)

>
> b) How do I call this EXE on machine C from webmethod in machine B

1) You could set up anohter webservice on machine C that calls the
exe for you and then returns the result to B

2) You could download PsExec from [1] and starting the process
from your (b)-machine

[1] http://www.sysinternals.com/ntw2k/freeware/psexec.shtml

// Fredrik Tonn

>
> Thank you,
> Ashish
>
> ===================================
> This list is hosted by DevelopMentor�  http://www.develop.com
> NEW! ASP.NET courses you may be interested in:
>
> 2 Days of ASP.NET, 29 Sept 2003, in Redmond
> http://www.develop.com/courses/2daspdotnet
>
> Guerrilla ASP.NET, 13 Oct 2003, in Boston
> http://www.develop.com/courses/gaspdotnet
>
> View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to