An error is reported when uploading large video files in ASP. NET and iis7.0.

Source: Internet
Author: User

I. Problem Overview:

Recently developed the function of uploading video files. The basic process has been completed, but an error will be reported when uploading files of more than 30 mb.

 

 

2. Ocean of information

I checked some information on the Internet, which is generally described below:

The steps are not cumbersome, but I did not find the <requestlimits> node. Helpless. If someone else knows what is going on, give me some advice...

 

3. Looking back, the answer is in the dark

In fact, the cause of the error analyzed above is correct, that is, the maximum file size allowed to be uploaded in IIS is more than 20 mb by default. Therefore, this error is reported only when a large file is uploaded. Later, this setting was modified in another way.

The target is to modify the file c: \ windows \ system32 \ inetsrv \ config \ schema \ iis_schema.xml. The green underline area shows the target location to be modified.

 

< Element Name = "Requestlimits" >
< Attribute Name = "Maxallowedcontentlength" Type = "Uint" Defaultvalue =" 30000000 "   />
< Attribute Name = "Maxurl" Type = "Uint" Defaultvalue = "4096"   />
< Attribute Name = "Maxquerystring" Type = "Uint" Defaultvalue = "2048"   />
< Element Name = "Headerlimits" >
< Collection Addelement = "Add" Clearelement = "Clear" Removeelement = "Remove" >
< Attribute Name = "Header" Type = "String" Required = "True" Isuniquekey = "True" Validationtype = "Nonemptystring"   />
< Attribute Name = "Sizelimit" Type = "Uint" Required = "True"   />
</ Collection >
</ Element >


, this file is read-only, that is, the Administrator permission cannot be modified. You must first modify the File Permission and then remove the read-only attribute.

1. right-click a file and choose Properties> Security. Select the target user and click Advanced to modify the file owner.

2. click Edit to modify the permissions of the current user and add the write permission. Now, the permission settings are OK.

3. Remove the read-only attribute of the file.

4. Open vs as an administrator, edit the target XML file in Vs, and modify the desired location.

5. Upload a m video. OK.

now, the success is achieved.

reference: http://help.powereasy.net/help/SiteFactory/2779.html

Related Article

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.