PDA

View Full Version : سوال: مشکل در آپلود فیلم



reza_majid68
سه شنبه 20 دی 1390, 08:37 صبح
سلام . من یه کنترل فایل آپلود دارم رو صفحه . ولی وقتی که میام باهاش فایل ویدویی آپلود کنم اصلا خطا نمیده و فایل رو آپلود نمیکنه . باید چیکار کنم . تو فایل های دیگه مشکلی نداره .اگر دوستان کسی بلده زودتر راهنمایی کنید . متشکرم
string fname = FileUpload1.FileName;

string path = Server.MapPath("~/pages/films/");
//////////////////////////
string[] pasvand = { ".mp4", ".wmv" };
string ext = System.IO.Path.GetExtension(FileUpload1.PostedFile .FileName);
if (Array.IndexOf(pasvand, ext.ToLower()) < 0)
{
Label22.Text = "پسوند مجاز نیست";

Label22.Visible = true;
return;
}



while (System.IO.File.Exists(path + fname))
{
fname = "1" + fname; ;
}
/////////////////////////////
FileUpload1.PostedFile.SaveAs(path + fname);
Label22.Visible = true;
Response.Write("upload shod");

hamid_shrk
سه شنبه 20 دی 1390, 08:39 صبح
چه خطایی میده؟

reza_majid68
سه شنبه 20 دی 1390, 09:01 صبح
میره این صفحه
The connection was reset







The connection to the server was reset while the page was loading.





The site could be temporarily unavailable or too busy. Try again in a few
moments.
If you are unable to load any pages, check your computer's network
connection.
If your computer or network is protected by a firewall or proxy, make sure
that Firefox is permitted to access the Web.

Saman Hashemi
سه شنبه 20 دی 1390, 09:04 صبح
مشکل احتمالا از سایز فایل به اینجا (http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx)مراجعه کنید...!

reza_majid68
سه شنبه 20 دی 1390, 09:09 صبح
دست شما درد نکنه مشکلم حل شد