Click here to Skip to main content
15,867,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
C#
protected void LinkButton5_Click(object sender, EventArgs e)
    {
            string myPath = ("D:\\myfolder\\addresses");
            Process prc = new Process();
            prc.StartInfo.FileName = myPath;
            prc.Start();


}


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 asp.net/c#

thanks in advance
Posted
Updated 21-Dec-12 19:33pm
v2
Comments
Shahin Khorshidnia 22-Dec-12 2:09am    
Did you check the path if it exists? If yes, have you checked the permissions?

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...[^]
 
Share this answer
 
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
 
Share this answer
 
Comments
[no name] 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900