473,779 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Fi leName = exeFilePath
ps.StartInfo.Ar guments = 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 14203
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.Fi leName = exeFilePath
ps.StartInfo.Ar guments = 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.I s 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.I s 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
1481
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' type command , so I can wait for the remote machine to finish, everything is synchronized in this respect.
7
717
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
6596
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. There is no consistency when it fails. Could anyone here shed some light on how to debug/resolve the issue. I guess IBM looked at the issue and were not able to pinpoint where the issue is. When the program hangs and when force the DB2...
7
6863
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 some proccess on local machine and do something. This works perfect on the machine (XP) where I have been developing this app!
12
2373
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 head. Natuarally it will not work. I expect it to use up all resources looping, which will not allow the process to complete. The process takes about 60 seconds, because the .bat file it is calling is rebuilding mulitple .NET solutions and projects...
0
13746
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 until it's finished. If the command didn't terminate within the timeout, the command is killed. (Ex. 2) - launch the command and continue your processing after the command has been started remotely (Ex. 3).
1
1459
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 process (exe) at their task bar it runs as back ground process only. but it coes as popup in local mechine? plese some one can give me solution in c# thank u
1
2899
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 = RunCommand("calc.exe", "MachineName", "MachineName\UserID", "Password") Console.WriteLine(retValue) End Sub Function RunCommand(ByVal strCommand As String, ByVal strMachineName As String, ByVal strUserName As String, ByVal strPassword As...
0
1202
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 give me required information. some times i face problem that the second thread associated with "Dummy.vbs" script file, do not reach at specified remote machine, and give error message after 45 seconds to 1 minute, i want that to terminate its...
0
9636
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10074
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.