Process.start() to call an exe in remote system

K

kk

hello to all,

I want to call an exe file on other system(on the same LAN)though a
webservice(by placing the dll).For that i use the following code in
C#......

Process ps = new Process();
ps.StartInfo.FileName = exeFilePath
ps.StartInfo.Arguments = arguments;
ps.Start();
ps.WaitForExit();

It calls the exe file that i can see it in TaskManager.But it doesn't
execute.It remains untill i have to kill that process.But in console
application the same code works fine.If the webservice is in the same
system it works properly.If i copy the dll and put it somewhere else i
doesn't work.I think it is a security problem.

I don't want webconfig file....
(There we can put i impersonate = "true")

Can anyone help me on this issue.........

Thanks

Karthik
 
G

Guest

Kartik,

Is that exe running under aspnet user name or what???

If that exe may need network access then it might be the case that running
 
K

kk

Gujju

Thanks for your reply .

The exe runs under the userName NETWORK SERVICE.But i want that to be
ADMINISTRATOR.Is there any option to give administrator permission
through Process.Start() method...
 
K

kk

If i execute the webservice it invoke the exe by its userName as
NETWORK SERVICE.But i need to execute the exe with ADMINISTRATOR
Permission
 
G

Guest

KK i know that... it uses Network service as the webservice is going to run
on iis which is running under network service so all the exes which are
invoked within from the web service would be invoked by network service as
the parent(IIS process) is running NETwork Service.

To solve this u need to run the IIS under a specified user (may by admin or
any othew domain user which can access and process your exe)

On windows 2003 you can change the application pool to run under a specified
domain controlled username.

I also need to aware you that dont run IIS under admin. But just create a
domain account which has less previlages and run the whole iis to run under
that username

cheers
C
 
K

kk

Thanks Gujju...........

I already created an application pool.But it shows some server
error.Thats why i don't use application pool.But I put the
coresponding asmx ,dll and webconfig in seperate folder under the
created application pool.Noe its working.Once again thanks for your
guidance...

Regards

karthick.k
 

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

Top