Starting exe application on server side using web services doesn't work.

O

Oren

Hi,
I needed a client side to be able to start an exe application on
server side (It's an exe application with no gui that
preformce actions on some hardware).
I used Web services in order to do so.
The web service call the remote function that first update some data
in a few files and then
start the application using Process.Start().

The problem is that the though the remote function is being called and
the it does write to file and retuns a string value as it ahould.
it failed to start the exe application.
On the server computer i see the process starts and after a secode its
gone (In task manager).

this is how i call the the web service on client side:
//create web reference
EngineRef.Engine oWebService = new EngineRef.Engine();
//i tried defualt credentials and also network with user and password,
both didn't work.
oWebService.Credentials =
System.Net.CredentialCache.DefaultCredentials;
// oWebService.Credentials = new System.Net.NetworkCredential(sUser,
sPassword);
//call the remote function.
string sReturnValue = oWebService.Reset();

In the server event viewer i get .NET run time error but with event ID
0 something like:
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot
be found....

I guess its a security issue but i can't figure it out and whether its
IIS or .NET issue.

My server is windows server 2003 standard edition service pack 2.
Running IIS6 in the authentication method and access its without
anonymous and integrated windows authentication.

I would like all clients to be able to run this web service don't care
much about security.
Any ideas ? Pls advice.
Thanks.
 
J

Javier G. Lozano

Hi,
I needed a client side to be able to start an exe application on
server side (It's an exe application with no gui that
preformce actions on some hardware).
I used Web services in order to do so.
The web service call the remote function that first update some data
in a few files and then
start the application using Process.Start().

The problem is that the though the remote function is being called and
the it does write to file and retuns a string value as it ahould.
it failed to start the exe application.
On the server computer i see the process starts and after a secode its
gone (In task manager).

this is how i call the the web service on client side:
//create web reference
EngineRef.Engine oWebService = new EngineRef.Engine();
//i tried defualt credentials and also network with user and password,
both didn't work.
oWebService.Credentials =
System.Net.CredentialCache.DefaultCredentials;
// oWebService.Credentials = new System.Net.NetworkCredential(sUser,
sPassword);
//call the remote function.
string sReturnValue = oWebService.Reset();

In the server event viewer i get .NET run time error but with event ID
0 something like:
The description for Event ID ( 0 ) in Source ( .NET Runtime ) cannot
be found....

I guess its a security issue but i can't figure it out and whether its
IIS or .NET issue.

My server is windows server 2003 standard edition service pack 2.
Running IIS6 in the authentication method and access its without
anonymous and integrated windows authentication.

I would like all clients to be able to run this web service don't care
much about security.
Any ideas ? Pls advice.
Thanks.

A couple of questions:

Under what credentials does the .exe on the server need to run under?
Under what credentials is the IIS application containing your Web
Service running under?
 
O

Oren

Javier G. Lozano :
A couple of questions:

Under what credentials does the .exe on the server need to run under?
Under what credentials is the IIS application containing your Web
Service running under?

Hi,
I kind of new in all the security issues.
where can i check it ?
I tried running the web-service with default credentials and network.
10X.
 
J

Javier G. Lozano

Javier G. Lozano :








Hi,
I kind of new in all the security issues.
where can i check it ?
I tried running the web-service with default credentials and network.
10X.- Hide quoted text -

- Show quoted text -

Do you have impersonation turned on? To learn more about it, go here:
http://msdn2.microsoft.com/en-US/library/aa292118(VS.71).aspx

Essentially you want to pass the default credentials from the client
to the service and have the thread handling the request to run as
those credentials. That way you can execute the .exe on the server.

Another question, are you giving the full path to the .exe or just the
name?
 
O

Oren

Hi Javier, Thanks for the replay.
I put the following in the web.config
<identity impersonate="true"
userName="domain\user"
password="password" />
With the user and password of an admin user in the server.
Still it doesn't run the exe application.
when i run it localy on the server (using invoke) i see the process
starts for a second with user
NETWORK SERVICE. when i try to call it from an aspx page it doesn't
start al all.
(it does read and write from file but doesn't start the exe).
I use full path to the exe and i allowed all users full permission on
it.
Pls Advise.
10X.

Javier G. Lozano :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top