HighTechTalks DotNet Forums  

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

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Starting exe application on server side using web services doesn't work. in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Oren
 
Posts: n/a

Default Starting exe application on server side using web services doesn't work. - 06-12-2007 , 06:18 AM






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.


Reply With Quote
  #2  
Old   
Javier G. Lozano
 
Posts: n/a

Default Re: Starting exe application on server side using web services doesn't work. - 06-12-2007 , 11:54 AM






On Jun 12, 5:18 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
Quote:
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?



Reply With Quote
  #3  
Old   
Oren
 
Posts: n/a

Default Re: Starting exe application on server side using web services doesn't work. - 06-13-2007 , 07:19 AM




Javier G. Lozano :
Quote:
On Jun 12, 5:18 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
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?
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.



Reply With Quote
  #4  
Old   
Javier G. Lozano
 
Posts: n/a

Default Re: Starting exe application on server side using web services doesn't work. - 06-13-2007 , 10:17 AM



On Jun 13, 6:19 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
Quote:
Javier G. Lozano :





On Jun 12, 5:18 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
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?

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/lib...18(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?



Reply With Quote
  #5  
Old   
Oren
 
Posts: n/a

Default Re: Starting exe application on server side using web services doesn't work. - 06-18-2007 , 04:58 AM



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 :
Quote:
On Jun 13, 6:19 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
Javier G. Lozano :





On Jun 12, 5:18 am, Oren <orenlev... (AT) gmail (DOT) com> wrote:
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?

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/lib...18(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?


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.