Fileupload control iis7 upload restriction setting method

Source: Internet
Author: User

ArticleFrom the Internet (for self-Lab ):

I tested the fileupload control yesterday. I failed to upload a large Attachment based on iis7. As long as it exceeds 30 mb, it will not work. But I set it in Web. config

<Httpruntime maxrequestlength = "2097151" execti/>

Why does it not work ni. according to the error message prompted by IE:
Enter % WINDIR % \ system32 \ inetsrv \ config \ applicationhost. config, and click open.
Find the node in the applicationhost. config file.
Delete the maxallowedcontentlength attribute. Alternatively, add a value so that the size of the Content Header sent by the client as part of the request is the same. By default, the value of the maxallowedcontentlength attribute is 30000000.
The default value of maxallowedcontentlength is not 30 mb.
Then understand the web. the config file is set for a web site. the upload size of not all sites. when applicationhost. maxallowedcontentlength is not set in config. The default value is 30 m. in the web. the value in config exceeds 30 mb. the maximum upload size is 30 mb. the page is in applicationhost. no node found in config. add the node later.
Add a node to the node.

<Requestfiltering>
<Requestlimits maxallowedcontentlength = "the upload value you want to set"/>
..........
</Requestfiltering>

 

 

 

Upload the large attachment again. OK...

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.