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...