473,395 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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

Nov 21 '05 #1
6 14146
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
on aspnet user wont give access to the network resource.
"kk" wrote:
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

Nov 21 '05 #2
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...

Nov 21 '05 #3
So its network service ie windows 2003 server....
As the process.start will invoke and take the parent username...
so either u run the parent as administrator or use api to invoke a process
under a username.

and have a look at this post as well..

http://groups.google.com.au/groups?h...gbl%26rnum%3D1

Hope it helps
Cheers
C

"kk" wrote:


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...

Nov 21 '05 #4
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

Gujju wrote:
So its network service ie windows 2003 server....
As the process.start will invoke and take the parent username...
so either u run the parent as administrator or use api to invoke a process
under a username.

and have a look at this post as well..

http://groups.google.com.au/groups?h...gbl%26rnum%3D1

Hope it helps
Cheers
C


Nov 21 '05 #5
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

"kk" wrote:
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

Gujju wrote:
So its network service ie windows 2003 server....
As the process.start will invoke and take the parent username...
so either u run the parent as administrator or use api to invoke a process
under a username.

and have a look at this post as well..

http://groups.google.com.au/groups?h...gbl%26rnum%3D1

Hope it helps
Cheers
C


Nov 21 '05 #6
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
Gujju wrote:
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

"kk" wrote:
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

Gujju wrote:
So its network service ie windows 2003 server....
As the process.start will invoke and take the parent username...
so either u run the parent as administrator or use api to invoke a process
under a username.

and have a look at this post as well..

http://groups.google.com.au/groups?h...gbl%26rnum%3D1

Hope it helps
Cheers
C



Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: student | last post by:
Hi, I am working on a project where I need to start processes on remote machines, across mac, linux, windows from one server or 'manager' machine. For now, I only need to implement a 'wait'...
7
by: Yosh | last post by:
I am developing an application that will stop and start a process on a remote machine. What security rights are needed for my application to be able to do this? Hope this makes sense. Yosh
4
by: Prince Kumar | last post by:
I joined a company recently and they have a java program which hangs (does nothing) after a while. This is no way consistent. It could succeed quite a few times and can fail a few other times....
7
by: Denis Brkljacic | last post by:
Hi, I have made some simple ASP.NET (C#) application, that somewhere uses this command: Process aProcesses = Process.GetProcesses(Environment.MachineName); This command purpose is to find...
12
by: Raymond Lewallen | last post by:
How to wait for a process to stop completion is my goal. Obviously, the looping while waiting for the HasExited property is not a solution.. but thats the best I can come up off the top of my...
0
by: Patrick A. | last post by:
Dll written in VB.NET 2003 to start a command remotely. You can : - launch the command and wait until it's finished. (Ex. 1) - launch the command providing a timeout in seconds, it will wait...
1
by: joerozario | last post by:
how to start process at the remote system? Actully i used WMI to start process at the remote system. the process is created, and shown in the task bar (process) but i am unable see the started...
1
by: remya1000 | last post by:
i'm tring to start a calculator in a remote machine from my system. and the codes i tried is this. Module Module1 Sub Main() Dim retValue As String retValue =...
0
by: balach | last post by:
hi all, i am using this code to initialize and assign it to a process, i am calling a thread on every 10 Seconds to fire vbscript file, this activity is performed on "timer1_Tick( )" event and...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.