Problem with file download link
-
Hi All, I have a download now button on aspx page, by clicking it need to prompt user to save the file which a movie file at server. i am using following code....
string path = Server.MapPath("Movie/movie.zip");
System.IO.FileInfo file = new System.IO.FileInfo(path); if (file.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = "application/zip"; Response.WriteFile(file.FullName); Response.End(); }
this code is working fine in local system...but giving problem when i upload it in to my hosting server. Please help me regrading this.
Pradeep Reddy
-
Hi All, I have a download now button on aspx page, by clicking it need to prompt user to save the file which a movie file at server. i am using following code....
string path = Server.MapPath("Movie/movie.zip");
System.IO.FileInfo file = new System.IO.FileInfo(path); if (file.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name); Response.AddHeader("Content-Length", file.Length.ToString()); Response.ContentType = "application/zip"; Response.WriteFile(file.FullName); Response.End(); }
this code is working fine in local system...but giving problem when i upload it in to my hosting server. Please help me regrading this.
Pradeep Reddy
when u load movie on hosting server. which folder store this movie. full security of conrol that folder.