Answered by:
ASP.NET Web Application Process Start not working in client machine

Question
-
User-1024101449 posted
I'm using Process,start to open Win Explorer for particular file server path.
It's working while i'm executing in server machine.
But, same when i am executing in client machine, i am getting access denied error.
What steps need to follow for this..?
protected void btn1_Click(object sender, EventArgs e) { Process p = new Process(); p.StartInfo.FileName = @"\\Server201A\MyFiles\"; p.Start(); }
Tuesday, June 18, 2019 6:06 AM
Answers
-
User-1038772411 posted
Hello gani7787,
When you call this code from an IIS server, the process will start on the server and not on the machine accessing the page which runs this code. If you check the iis server console you will see it has started (assuming permissions allow it).You cannot call process to run on a client machine with asp.net.
ASP.NET Web page and server control code executes in the context of the ASP.NET worker process on the Web server. If you use the Start method in an ASP.NET Web page or server control, the new process executes on the Web server with restricted permissions. The process does not start in the same context as the client browser, and does not have access to the user desktop
References for more details:
2) https://forums.asp.net/t/1816323.aspx?Process+start+is+not+working+in+IIS
3) https://forums.asp.net/t/2047793.aspx?Process+start+is+not+working+on+IIS+host+machine+
I hope this will help you to get your solution.
Thank you
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, June 18, 2019 6:21 AM
All replies
-
User-1038772411 posted
Hello gani7787,
When you call this code from an IIS server, the process will start on the server and not on the machine accessing the page which runs this code. If you check the iis server console you will see it has started (assuming permissions allow it).You cannot call process to run on a client machine with asp.net.
ASP.NET Web page and server control code executes in the context of the ASP.NET worker process on the Web server. If you use the Start method in an ASP.NET Web page or server control, the new process executes on the Web server with restricted permissions. The process does not start in the same context as the client browser, and does not have access to the user desktop
References for more details:
2) https://forums.asp.net/t/1816323.aspx?Process+start+is+not+working+in+IIS
3) https://forums.asp.net/t/2047793.aspx?Process+start+is+not+working+on+IIS+host+machine+
I hope this will help you to get your solution.
Thank you
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Tuesday, June 18, 2019 6:21 AM -
User-1024101449 posted
Thanks for your help.
What is the alternative ways to open Win Explorer through ASP.NET Application in IIS (client machine).
Tuesday, June 18, 2019 6:51 AM -
User-1038772411 posted
Hello gani7787,
This is not possible. You're code is running server side and you only have access to the server side process (if you have sufficient permissions, which normally shouldn't be the case).
reference
https://stackoverflow.com/questions/16588078/is-there-a-way-to-open-windows-explorer-from-iis-7
Thank you.
Tuesday, June 18, 2019 7:04 AM -
User-1024101449 posted
Thnaks a lot...
Tuesday, June 18, 2019 7:20 AM