Can't upload tiff file which is 5MB or more in size
When I upload small sized tiff file(approx. 800KB) in my website folder on local system through fileupload control in asp.net. It uploads the file successfully. But when I upload 5MB or more in size tiff file. It can't upload file and display the following message.
开发者_如何学运维Internet Explorer cannot display the webpage. Here is my code:if (FileUpload1.HasFile) { string filename = FileUpload1.PostedFile.FileName.ToString(); string fileType=Path.GetExtension(filename); if ((fileType == ".tiff") || (fileType == ".tif")) { FileUpload1.SaveAs(Server.MapPath("~/uploads/bio/" + FileUpload1.FileName.ToString())); Response.Write("File Saved"); } else { Response.Write("Select only tiff file"); } }Please give any suggestion.
Thanks in advance
Dinesh KumarYou would expect that there is a file size limit on uploads:
http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx
I think that your broblem is on the IIS server maxi configuration.
IIS 6: http://tutorials.fastdot.com.au/web/Tutorials/Windows-Plesk-Server-Management/IIS-Upload-File-Size/ IIS 7: http:// www.cyprich.com/2008/06/19/fixing-file-upload-size-limit-in-iis-7/
精彩评论