Search Persits Software Knowledge Base

 

Article PS01032618

800A0005 Access is denied error

Problem Description

When uploading a file with AspUpload, the line of code

Count = Upload.Save(foldername)

or

Count = Upload.SaveVirtual(virtfoldername)

generates the following error:

Persits.Upload.1 (0x800A0005)
Access is denied.

Solution

Scenario 1: Upload directory is local.

This is an NTFS permission problem. The current user (such as IUSR_machinename) must have Full Control over the upload directory to be able to create files in it. You can instantly fix this problem by giving Everyone Full Control over the upload directory, then tighten security as appropriate. To change permissions on a folder, right-click on it in Windows Explorer, then select Properties/Security.

Scenario 2: Upload directory is remote.

To avoid the Access is Denied error when saving to a remote UNC path such as \\server\share\dir, you should call the method Upload.LogonUser to impersonate an admin account, as follows:

Upload.LogonUser "domain", "username", "password"
Upload.Save "\\server\share\dir"

Created: 2/8/2002 5:08:19 AM
Last Modified: 2/9/2002 4:19:14 PM

Copyright © Persits Software, Inc. 1998 - 2018
For technical support, write to support@persits.com.