C # HTTP 404 error when uploading large files using Asp.net uploadify

Source: Internet
Author: User

The company has a project

It is required that the size of the uploaded attachment be limited to 50 MB, which was originally thought to be easy to handle. In compilation mode, you can upload large files. However, in iis7 (a self-built server), an HTTP 404 error occurs when a large file is uploaded, and occasionally some files have Io. Error errors. I have never understood it. I search the Internet to find out that the upload control is divided into two upload modes:

1. Read the file to the memory at one time and then write it to the service. In this way, if the file is too large, the service response will be slow.

2. The overseas upload controls lion. Web. uploadmodule and aspnetupload (I also searched online) are used to read, read, and write files to the hard disk in multiple parts.

I have not thoroughly studied whether the uploadify upload control is a 2nd method, that is, to use it.

After searching for a long time, I finally found an article to solve the problem of HTTP 404 (Good News)

Http://hi.baidu.com/v71000/blog/item/3ff017f7e13f727fdcc4748f.html

Uploading large files under IIS6 with uploadify is okay, but when migrating to iis7, an HTTP 404 error occurs when uploading large files.

After checking for half a day, it turns out that the default setting in iis7 limits the upload size. In this case, the size setting in Web. config becomes invalid.

Procedure:

1. Open the IIS manager and find the default web site. Stop the service first.

2. Double-click "request filtering" in IIS.

3. Click "Edit function Settings" on the right side to open the "Edit request filter settings" dialog box.

The maximum allowed capacity length is "30000000" by default, 30 M. modify it to the size you need.

4. Start IIS.

This will solve the problem of uploading large files. After that, I will continue to write some uploadify experiences and record them!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.