IIS upload file picture size limit, default 200k solution

Source: Internet
Author: User
Tags file upload metabase

There are two ways:

1, use the component Upload file function, install a component on the server side, usually is the AspUpload component, the upload component uses, many.

Modify the file upload size on the server as follows:

First step:
In IIS, right-click Local computer to select Properties and check "Allow direct editing of the metabase."
Step two: Turn off the IIS Admin service
Turn on Control Panel-Administrative Tools-services, locate the IIS Admin service on the right, select the key and right-click, and select Stop to turn off the service.
Step three: Modify the "MetaBase.xml" file
Open C:windowssystem32inetsrv ", locate the" MetaBase.xml "file in the folder, open" MetaBase.xml "in Notepad, and search for" aspmaxrequestentityallowed "in it. Change the following "204800" to "1024000000" to save the file.
Fourth step: Turn on the "IIS Admin Service" service

After the modification completes, follow the first step to turn on the IIS Admin service.

Addon: Workaround 2

1. Create a new text file:

  code is as follows copy code

Use VBS

Set Obj1=getobject (" Winmgmts:/root/microsoftiisv2 ")

Set Obj2=obj1.get ("Iiswebvirtualdirsetting= ' W3svc/1/root '")

' Output default value

WScript.Echo ' aspmaxrequestentityallowed Default Value: "& Obj2. aspmaxrequestentityallowed

Reset the value

Obj2. aspmaxrequestentityallowed=1024000 ' Set to 1mbyte, u can set to other what for you want

' Save data

Obj2. Put_ ()

' Output new value

WScript.Echo ' aspmaxrequestentityallowed New value: ' & Obj2. aspmaxrequestentityallowed

2. Save As Requestchange.vbs

3. Go to the command line, run:

cscript [Path]requestchange.vbs

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.