Forums

ASP

This topic is locked

ASP Upload permission problem - I think!

Posted 23 Jul 2006 17:23:58
1
has voted
23 Jul 2006 17:23:58 Gary Maddock-Greene posted:
Hi People, I could really do with some help on this please.

I have a site that consists of an admin page for adding news articles and images. I am using ASP Upload to send the images to the server when I add a news article. I am using ASP VB Script on an NT box.

The problem I have is this.

When I have permissions set on my target upload directory to NOT allow write and modify, my form data gets put into my database but the images upload fails. This obviously is what you would expect. But when I set permissions on the said folder to allow write and modify, the images goes up to the server now OK but I get the following error and my text form data never makes it to my database.

I just get this error:

Error: System.UnauthorizedAccessException: Access to the path 'C:\xxxx\xxxx\xx\dxxxxxx\images\upload_bin\testimagegmg2_4.jpg' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.Delete(String path) at ASP.scriptlibrary_resizeimage_aspx.Page_Load(Object s, EventArgs e)

This is driving me crazy. I really do not know how to correct it and I could really do with some help please.

Thanks you very much for your anticipated time.

Gary

Replies

Replied 24 Jul 2006 12:16:03
24 Jul 2006 12:16:03 Patrick Woldberg replied:
Indeed a permission problem, but not with the upload but the resize. You use ASP.NET for resizing, give the user for ASP.NET enough permissions to write/delete a file.

--------------------------------------------------
Patrick Woldberg
Web Developer at Dynamic Zones
Administrator at DMXzone.com, FLzone.net, FWzone.net and DNzone.com
--------------------------------------------------
Replied 24 Jul 2006 12:21:49
24 Jul 2006 12:21:49 Gary Maddock-Greene replied:
Hi Patrick, thanks. I'm a bit new to this. What directory are you saying I should be setting permissions on? How do I give the user for ASP.NET enough permissions to write/delete a file?

Thanks G

Reply to this topic