Last post Jun 18, 2019 07:20 AM by gani7787
Jun 18, 2019 06:06 AM|gani7787|LINK
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\";
Jun 18, 2019 06:21 AM|AddWeb Solution|LINK
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:
I hope this will help you to get your solution.
Jun 18, 2019 06:51 AM|gani7787|LINK
Thanks for your help.
What is the alternative ways to open Win Explorer through ASP.NET Application in IIS (client machine).
Jun 18, 2019 07:04 AM|AddWeb Solution|LINK
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).
Jun 18, 2019 07:20 AM|gani7787|LINK
Thnaks a lot...