PDA

View Full Version : خطای fileuploadروی host



مهدیه سلطانی
سه شنبه 01 تیر 1389, 13:06 عصر
سلام
اطلاعات داخل fileupload روی hostذخیره نمی شود در صورتی که روی localhost به درستی این کار صورت می گیرد خطایی که روی host می دهد این است ازدوستانی که اطلاعاتی در مورد این خطا دارند تقاضا می کنم راهنماییم کنند.


Access to the path 'C:\Inetpub\vhosts\anjoman-dafater.ir\httpdocs\images\h.png' is denied.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\anjoman-dafater.ir\httpdocs\images\h.png' is denied.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

Source Error:

Line 22: SqlDataSource1.Insert();
Line 23: String path = Server.MapPath("~/images/");
Line 24: FileUpload1.PostedFile.SaveAs(path + FileUpload1.FileName);

maxpayn2
سه شنبه 01 تیر 1389, 13:08 عصر
به فولدر images دسترسی write داری ؟

مهدیه سلطانی
چهارشنبه 02 تیر 1389, 10:07 صبح
اره این دسترسی را دارم

مهدیه سلطانی
چهارشنبه 02 تیر 1389, 10:29 صبح
البته روی host این دسترسی را ندارم و فقط روی local می توانم این کار را انجام دهم

raziee
چهارشنبه 02 تیر 1389, 11:29 صبح
البته روی host این دسترسی را ندارم و فقط روی local می توانم این کار را انجام دهم
؟؟؟؟
دسترسی لوکال ارتباطی با سرور نداره!!!!

اگه دسترسی تغییر پرمیشن فولدر ها رو ندارید به پشتیبانی هاستتون تماس بگیرید و بگید که این دسترسی رو بهتون بدن که بتونید پرمیشن رو برابر با نیاز ست کنید.


توجه داشته باشید که بیشترین خطا ها برای آپلود برای عدم دسترسی صحیح به فولدر مربوطه برای آپلود است.