File upload error

Discussion in 'ASP.NET 2.0' started by superwizbang, Jul 20, 2008.

  1. Hello all (Bruce),

    I have yet another (different) file upload question. I will pass the specifics below. Basically I am letting an administrator upload an image file on an isolated image directory on my server space (but within my web directory). Currently, I am getting the following (edited) error:

    System.UnauthorizedAccessException: Access to the path 'E:\web\**SERVER NAME EDITED**\htdocs\**FOLDER NAME EDITED**\ProductImages\Corals\Hard Corals\Acanthastrea echinata\acan2.jpg' is denied. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at Controls_ImageGallery.Upload_Image() in E:\web\**SERVER NAME EDITED**\htdocs\**FOLDER NAME EDITED**\Controls\_ImageGallery.ascx.vb:line 208 </BLOCKQUOTE>
    Here is my code:

     
  2. Figured it out. My pathing was incorrect.

    -Ken
     
  3. Good job. [​IMG]
     

Share This Page