Click here to Skip to main content
14,212,407 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi All,

I am using VS2008 OS XP IIS 5 Authentication mode forms.

Error occurred when file is uploading


how to solve it




Upload status: The file could not be uploaded. The following error occured: Access to the path 'D:\ashok1\jobs\Documents\ashok.docx' is denied.

Please help me.

Thanks in Advance.
Posted
Updated 10-Jul-11 19:52pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

You can't save files to any folder outside the web site's virtual folder on the server. It's a security thing. However, you can save it to your web site's folder, and have windows service running on that server that looks for new files and then copies those files to a folder external to your web site.
   
Comments
Espen Harlinn 10-Jul-11 10:41am
   
Or OP can simply adjust the rights if the IIS user for the application pool to allow access to a particular folder ...
#realJSOP 10-Jul-11 11:32am
   
Which would be a *bad* thing to do. Your web site should not be allowed unfettered access to the rest of the server.
Espen Harlinn 10-Jul-11 13:43pm
   
Create user with limited quota, allow access to subdirectory, can hardly be called unfettered access ...
Sergey Alexandrovich Kryukov 10-Jul-11 17:15pm
   
I basically agree, despite the ways to do otherwise, my 5.
--SA
Prasanta_Prince 11-Jul-11 3:22am
   
agree my 5
BobJanova 11-Jul-11 6:01am
   
If including temporary or output documents within the web site's virtual tree, you should set that folder not to be available through web requests (chmod 770, not sure how to do it in Win/IIS).
Rate this:
Please Sign up or sign in to vote.

Solution 2

Did u set the permission of Folder : right click on folder set the set the permission "Everyone" i think this might solve the problem
   

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



Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190619.2 | Last Updated 11 Jul 2011
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

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