can anybody help me how to call any windows exe on asp.net when i have mentioned the code
system.diagnositics.process.start("filename.exe") it is definetly open during compile time but when create the virtual directory and run on the localhost or client machine then it will not open on that case i have manage the iis where on authentication
method check the windows integrated authentication. but no any effect so plz help me its too urgent
If you didn’t use impersonation, the default ASP.NET running account is “ASPNET” (for IIS 5) or “Network Service” (for IIS 6). You should give the ASP.NET running account read & execute permission for the folder which contains the exe file.
For example: if the exe file is store in d:\temp\test.exe.
1. In Window Explorer, right click “temp” folder and select “Properties”
2. In Security tab, add “ASPNET” or “Network Service” in and give the “Read & Execute” permission.
If you use impersonation, please check which account you are impersonating. To do so, please refer to the following link:
Please bear in mind that process.start will start the server side exe file, not client side. To execute the exe file from the client side, we should use javascript. I have provided the following code for your reference. I hope it is helpful to you.
<script language="javascript" type="text/javascript">
function RunEXE()
{
var oShell = new ActiveXObject("WScript.Shell");
var prog = "c:\\WINDOWS\\system32\\notepad.exe";
oShell.Run('"'+prog+'"',1);
}
</script>
Sincerely,
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
i am asp.net developer. so my problem is here i want to retrive keywords for particular website when i have given domain name so if any body have any solution regarding this then kindly reply as soon as .
<script language="javascript" type="text/javascript">
function RunEXE()
{
var oShell = new ActiveXObject("WScript.Shell");
var prog = "c:\\WINDOWS\\system32\\notepad.exe";
oShell.Run('"'+prog+'"',1);
}
</script>
agaurav.anim...
0 Points
18 Posts
call exe on client machine
Jun 21, 2007 05:29 AM|LINK
hello friends
can anybody help me how to call any windows exe on asp.net when i have mentioned the code
system.diagnositics.process.start("filename.exe") it is definetly open during compile time but when create the virtual directory and run on the localhost or client machine then it will not open on that case i have manage the iis where on authentication method check the windows integrated authentication. but no any effect so plz help me its too urgent
thanks in advance
DarrellNorto...
All-Star
86555 Points
9624 Posts
Moderator
MVP
Re: call exe on client machine
Jun 21, 2007 11:50 AM|LINK
Did you also turn on impersonation? Or did you give the ASP.NET account permission to access the exe? It sounds like a security issue.
Darrell Norton's Blog
Please click "Mark as Answer" if this helped you.
agaurav.anim...
0 Points
18 Posts
Re: call exe on client machine
Jun 22, 2007 04:43 AM|LINK
thanx for yr sugession but i hav not idea about how to give the permission to asp.net account permission so plz help me
Benson Yu - ...
All-Star
34797 Points
2497 Posts
Re: call exe on client machine
Jun 25, 2007 11:47 AM|LINK
Hi agaurav,
If you didn’t use impersonation, the default ASP.NET running account is “ASPNET” (for IIS 5) or “Network Service” (for IIS 6). You should give the ASP.NET running account read & execute permission for the folder which contains the exe file.
For example: if the exe file is store in d:\temp\test.exe.
1. In Window Explorer, right click “temp” folder and select “Properties”
2. In Security tab, add “ASPNET” or “Network Service” in and give the “Read & Execute” permission.
If you use impersonation, please check which account you are impersonating. To do so, please refer to the following link:
ASP.NET Identity Matrix
http://msdn2.microsoft.com/en-us/library/aa302377.aspx
Please bear in mind that process.start will start the server side exe file, not client side. To execute the exe file from the client side, we should use javascript. I have provided the following code for your reference. I hope it is helpful to you.
Benson Yu
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
agaurav.anim...
0 Points
18 Posts
Re: call exe on client machine
Jun 26, 2007 10:16 AM|LINK
Thanx 4 ur suggestion...But this throws the same error as earlier...."automation server cannot create any object"...
How would I going to solve this problem....
agaurav.anim...
0 Points
18 Posts
Re: retrieve keywords using asp.net
Jul 15, 2008 01:10 PM|LINK
hello friends
i am asp.net developer. so my problem is here i want to retrive keywords for particular website when i have given domain name so if any body have any solution regarding this then kindly reply as soon as .
thanks in advance
sagnikmukh
Participant
1850 Points
354 Posts
Re: call exe on client machine
Feb 24, 2010 01:40 AM|LINK
Anand Vishnu
Member
5 Points
8 Posts
Re: call exe on client machine
Apr 01, 2010 03:16 PM|LINK
I was also try in this similar thing
Sample Code
<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> ProcessStartInfo myProcess = new ProcessStartInfo("notepad.exe");</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myProcess.UserName = ConfigurationManager.AppSettings["username"];</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myProcess.Password = convertToSecureString(ConfigurationManager.AppSettings["password"]);</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myProcess.Domain = ConfigurationManager.AppSettings["domain"];</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> myProcess.UseShellExecute = false;</div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"> Process.Start(myProcess);</div>ProcessStartInfo myProcess = new ProcessStartInfo("notepad.exe");
///Start the process with some power user rather than Network Service or ASPNET. I also tried impersonation but no luck
myProcess.UserName = ConfigurationManager.AppSettings["username"];
myProcess.Password = convertToSecureString(ConfigurationManager.AppSettings["password"]);
myProcess.Domain = ConfigurationManager.AppSettings["domain"];
myProcess.UseShellExecute = false;
Process.Start(myProcess);
I gave permission on the folder, Enabled interact with Desktop on IIS Admin and Web Publishing Service.
Surprising enough, code runs fine on XP machine. On Server 2003 and Server 2007 the process just loads in the memory but do nothing.
Any pointers ???
sagnikmukh
Participant
1850 Points
354 Posts
Re: call exe on client machine
Apr 01, 2010 06:21 PM|LINK
i think there may be some prblem regarding IE security setup.
engr.yaseen
Member
156 Points
30 Posts
Re: call exe on client machine
May 15, 2010 11:11 AM|LINK
i have same problem ..
so pleas help me how where i can set permisssion to run exe at server side by client