Click here to Skip to main content
15,904,652 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am getting unauthorized access issue when using createdirectory function.
My application is deployed at windows 7.

I am creating directory in side c://ABC//BCD folder. I have given permission to a BCD folder
for IISuser and IUser, But still facing same issue. Can any one help me?
Posted

Make sure that the ABC,BCD folder is part of(sub folder) the Hosted Site.
if not, then you wont be able to Create folder in it..

Solution:
Create a site and host it in the IIS for c://ABC folder. and give full permission for that folder, then you can access the folder from other site..
 
Share this answer
 
Comments
amit_83 10-Feb-14 0:22am    
Thanks.
Site not hosted in that folder. Is there way to give rights in that folders?
Karthik_Mahalingam 10-Feb-14 1:31am    
no way..
Giving permission is not enough. Web applications are executed in the sandboxed environment which does not allow them to access any server-side file objects except those under the root directory configured for your site.

—SA
 
Share this answer
 
Comments
amit_83 10-Feb-14 0:25am    
Can you propose any solution?
Sergey Alexandrovich Kryukov 10-Feb-14 0:30am    
Sure. Change the location to a legitimate one.
—SA
amit_83 10-Feb-14 5:04am    
Is there possibility to create directory outside of deployment area?
Sergey Alexandrovich Kryukov 10-Feb-14 12:42pm    
Why? I don't know what do you call a deployment area. This is not related to deployment, only to service. No, you cannot access anything beyond the root directory reserved for your site. Why? Perhaps you can map some outside files as hard links or soft links to your site's directory...
—SA

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