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