An error occurred while processing large data volumes in WebService: An error occurred while running the specified extension in the configuration file. -> The maximum request length is exceeded ..

Source: Internet
Author: User

WebService processes large data volumes

The following error occurs when processing large data volumes through WebService:

Soap fault: An exception occurs when running the specified extension in the configuration file. ---> Exceeds the maximum request length.
Solution:

Because the uploaded file is greater than the default value configured by the system, the default Request Length of Asp.net Web Service is 4 MB.

1. For a single project, you only need to modify web. config:

You can reset the configuration in Web. config as follows:
<Configuration>
<System. Web>
<Httpruntime maxrequestlength = "1048576" executiontimeout = "3600"/>
</System. Web>
</Configuration>

 2. You can also directly modify the default configuration of the. NET environment to avoid modifying the configuration for each project.

Find C:/Windows/Microsoft. net/framework/v1.1.4322/config/machine. in the config file (the version and system are different, and the directories are slightly different), find "maxrequestlength =" 4096 "" and replace 4096 with a large value, in KB.

Httpruntime

Httpruntime is used to configure the Asp.net HTTP runtime settings to determine how to process requests to the Asp.net application.
Executiontimeout: Maximum time limit allowed for request execution, in seconds
Maxrequestlength: Indicates the maximum file upload size supported by ASP. NET. This restriction can be used to prevent DoS attacks caused by a large number of files being transferred to the server. The specified size is in KB. The default value is 4096 KB (4 MB), and the maximum value is 2097151.
Usefullyqualifiedredirecturl: Indicates whether client redirection is fully qualified (in the "http: // server/path" format, which is required by some mobile controls ), or indicates whether to send relative redirection to the client. If it is true, all non-fully-qualified redirects are automatically converted to a fully-qualified format. False is the default option.
Minfreethreads: Specifies the minimum number of free threads allowed to execute new requests. ASP. NET allows a specified number of threads to remain free by appending threads to complete the requests it processes. The default value is 8.
Minlocalrequestfreethreads: Indicates the minimum number of free threads allowed to execute new local requests maintained by ASP. NET. The number of threads is reserved for requests passed in from the local host to prevent some requests from sending subrequests to the local host during processing. This avoids possible deadlocks caused by recursive re-entering the web server.
Apprequestqueuelimit: Indicates the maximum number of requests that ASP. NET will queue for the application. Requests are queued when there are not enough free threads to process requests. When the queue exceeds the limit specified in this setting, the incoming request is rejected through the "503-the server is too busy" error message.
Enableversionheader: Specifies whether ASP. NET should output the version header. Microsoft Visual Studio 2005 uses this attribute to determine the current ASP. NET version. This attribute is not required for the production environment and can be disabled.

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.