Forum Moderators: open

Message Too Old, No Replies

Security Permissions

Need to access a folder via ASP script but not password via other

         

ASPhopeful

8:05 am on Sep 7, 2004 (gmt 0)

10+ Year Member



Hi All,

I have a folder on my website that contains downloads. The folder on the server has permissions to be accessed only by:

Administrators
System
DownloadUsers

The DownloadUsers means people access the downloads have to authenticate with a username and password.

However, there is an admin asp script that needs access to this folder to upload new downloads.

I am using
Set ExploreFiles = ExploreDir.GetFolder(Server.MapPath("../whereever/downloads"))
to detect which files are in the folder, however because of the security permission, I am getting a "Path not found" error.

Can someone please tell me either how to windows authenticate through an asp script or how to set the permissions so the admin script has access but website visitors still need their username and password.

Thanks
Helen

makeupalley

12:35 pm on Sep 7, 2004 (gmt 0)

10+ Year Member



Hi There,

1. I suspect that the path not found might really be a path not found error. I would output the full path and make sure it is correct.

Something like this:
Response.Write (ExploreFiles)

2. To switch to a different user you can use the following code from Micro$oft:

How to impersonate a user from Active Server Pages
[support.microsoft.com...]

If you do not have visual basic, send me a private message and I'll send you the compiled dll.

Hope this helps,

Elky

ASPhopeful

12:51 pm on Sep 8, 2004 (gmt 0)

10+ Year Member



Thanks MakeUpAlley,

I had already checked the path. It was a permissions error. I have since managed to add a second password protected that was already authenticated earlier.

Helen.