سلام دوستان وقت بخیر
من یه سایت رو که با asp.net نوشتم رو هاست اپلود کردم.برای بخش اپلود تصویر ارور میده.
این کدمه:
System.Drawing.Image image = System.Drawing.Image.FromStream(FileUpload6.PostedFile.InputStream); float imgWidth = image.PhysicalDimension.Width; float imgHeight = image.PhysicalDimension.Height; float imgSize = imgHeight > imgWidth ? imgHeight : imgWidth; float imgResize = imgSize <= 128 ? (float)1.0 : 128 / imgSize; imgWidth = 635; imgHeight = 250; System.Drawing.Image thumb = image.GetThumbnailImage((int)imgWidth, (int)imgHeight, delegate() { return false; }, (IntPtr)0); string fileName2 = Path.Combine(Server.MapPath("~/img"), FileUpload6.FileName); if (File.Exists(fileName2)) { Label6.Visible = true; Label6.Attributes["style"] = "color:red; font-weight:bold;"; Label6.Text = "عکسی با این نام موجود است.لطفا نام فایل را تغییر دهید"; } else { thumb.Save(fileName2); Label6.Attributes["style"] = "color:green; font-weight:bold;"; Label6.Visible = true; strname = FileUpload6.FileName.ToString(); msg = blk.update_slider(6, strname, TextBox16.Text, TextBox17.Text, TextBox18.Text); Label6.Text = msg; }
و این هم اروریه که سرور میده:
A generic error occurred in GDI+. 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.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. Source Error: Line 401: { Line 403: thumb.Save(fileName2); Line 404: Label6.Attributes["style"] = "color:green; font-weight:bold;"; Line 405: Label6.Visible = true;
چطور میتونم حلش کنم؟؟
مرسی از کمکتون
آیا فولدر مورد نظر در هاست وجود دارد
در پابلیش اگر فولدری خالی باشد پابلیش نمیشود
از وجود همه دایرکتوری ها در سرور مطمئن شوید
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)