Click here to Skip to main content
13,202,262 members (51,372 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to open a folder on the server where my application is hosted. the same is opened at the design time, but when the application is published it generates an error saying access is denied from the client machine. i am using the following code for opening the desired folder in the webserver
protected void LinkButton5_Click(object sender, EventArgs e)
            string myPath = ("D:\\myfolder\\addresses");
            Process prc = new Process();
            prc.StartInfo.FileName = myPath;


please can anyone help me. how to resolve the issue. do i need to assign permissions to the folder. I am using windows 7OS and IIS7 services and has written the code in

thanks in advance
Posted 21-Dec-12 19:31pm
Updated 21-Dec-12 19:33pm
Shahin Khorshidnia 22-Dec-12 2:09am
Did you check the path if it exists? If yes, have you checked the permissions?
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Well, the error says access is denied! Surely, one of the access permissions are missing. Checked for ASPNET user? Try impersonation and see if it works?

Refer my answer to similar question: Access to the path denied.. Pls help...[^]
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

i have granted full control to IIS_user and network services . but then also the same error exists. I am not aware of impersonation techniques. can u please help me with some sample code.
thanks in advance
Krunal Rohit 23-Dec-12 0:16am
post it as comment on particular solution.. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171020.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100