Configuration Under IIS7.0 for ASP. Net to upload large files solution, asp. netiis7.0
The open-source Brettle. Web. NeatUpload. Is used normally in IIS6.0, but is not used properly on Windows 2008 server IIS7.
I can see a solution on the Internet, but it does not work.
In IIS 7, the default file upload size is 30 mb. This limit must be exceeded:
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>
The problem is that the 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.
Open the \ Windows \ System32 \ inetsrv \ config \ schema folder in the system partition and use NotePad to open IIS_schema.xml and then modify the value 30000000. However, my test results failed. I logged on to the Administrator as a super user to modify the results. When I saved the file, the system prompts that I didn't have the permission. The file is read-only and can never be modified, therefore, I personally think this method is not suitable for general users,
So continue searching for new methods.
To enable the K upload limit in IIS configuration of win7, two steps are required:
1. Modify the value of "Maximum Request Entity limit" from IIS configuration;
2. Modify the value of "maximum allowed content length" from the "request filtering" configuration. The two steps are not sequential.
The following describes each of my operation steps. I can understand them at a basic glance. If I cannot understand them, I can combine them with text instructions.
If the picture cannot be viewed, View Original article: http://www.360doc.com/content/10/1109/22/1111809_68055132.shtml
Change the default size of files uploaded by iis
For ASP or. net
Step 1: Modify IIS settings to allow you to directly edit the configuration database. First open, Internet Information Service
Step 2: first disable the iis admin service in the service and find metabase under windows \ system32 \ inetsrv. xml, open, find ASPMaxRequestEntityAllowed and change it to the expected value. The default value is 204800, that is, 200 K. For example, change it to 102400000 (100 M ).
Restart the iis admin service.
Method 2:
Create a text file with the following content:
Set providerObj = GetObject ("winmgmts:/root/MicrosoftIISv2 ")
Set vdirObj = providerObj. get ("IIsWebVirtualDirSetting = 'w3svc/1/root '")
WScript. Echo "Before:" & vdirObj. AspMaxRequestEntityAllowed
VdirObj. AspMaxRequestEntityAllowed = 102400000
VdirObj. Put _()
WScript. Echo "Now:" & vdirObj. AspMaxRequestEntityAllowed
Save it as a. vbs file, for example, vf. vbs.
Then, in command line mode, run the cscript file path and file name, for example, cscript d: \ vf. vbs.
In this way, the ASP upload size is changed to the 102400000 bytes (100 MB) set above)
Supplementary description on win2003 upload restriction Solution
IIS6 Resource Kit Tools (www.microsoft.com/...angyunen) is loaded to the Microsoft Site. After installation, the (local) \ LM \ W3SVC \ AspMaxRequestEntityAllowed attribute is modified using Metabase Explorer (200 K = 204800 by default ), modify it to 1 GB, and modify the AspScriptTimeout attribute to adjust the time limit to upload large files.
In this case, the AspMaxRequestEntityAllowed is lost. Right-click to add the new attribute to asp, set the size you need, and click OK ~~~
For PHP
Open php. ini, first find
File_uploads = on; whether to allow file upload over HTTP. ON is enabled by default.
Upload_tmp_dir; upload the file to the place where the temporary file is stored on the server. If it is not specified, the default Temporary Folder will be used.
Upload_max_filesize = 8 m; wangwen business, that is, the maximum file size allowed to be uploaded. The default value is 2 MB.
Post_max_size = 8 m; the maximum value that can be received by posting a form to PHP, including all values in the form. The default value is 8 Mb.
Generally, after the preceding four parameters are set, upload <= 8 ...... the remaining full text>
Chen Yu [authoritative expert]
How to configure the ASPNET environment for iis70
Same as iis 6.0