HI mọi người, web mình bị lỗi System.UnauthorizedAccessException: Access to the path is denied mình sử dụng hosting windows iis 8.5 web host Plesk 12.5. Khi mình upload hình ảnh lên web nó báo lỗi như đoạn code dưới. Bạn nào chỉ mình cách khắc phục với, đang cần gấp, cảm ơn Mã: System.UnauthorizedAccessException: Access to the path 'C:\Webspace\...\httpdocs\imagesProduct\tui-xach-cho-phai-nu-ca-tinh-mau-den-437.png' 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, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode) at System.Web.HttpPostedFile.SaveAs(String filename) at System.Web.UI.WebControls.FileUpload.SaveAs(String filename) at WebInfoAS.Admincp.UpLoadImgProduct.btnUpLoad_Click(Object sender, EventArgs e) in ....\WebMoi-....\...\....\Admincp\UpLoadImgProduct.aspx.cs:line 179
Lỗi đó là bạn không có quyền truy cập folder upload hình ảnh trên hosting của bạn, bạn chỉ cần thêm quyền read cho thư mục đó là xong. Xem hướng dẫn link sau nhé: https://itseovn.com/threads/change-...-muc-trong-plesk-12-5-hosting-moi-nhat.13808/