简体   繁体   中英

414. The request URL is too long. asp.net

I'm getting the error "HTTP Error 414. The request URL is too long." From the following article, I understand that this is due to a very long query string:

http://www.mytecbits.com/microsoft/iis/query-string-too-long

In web.config, I have maxQueryStringLength="2097151". Is this the maximum value? In order to solve this problem, should I set maxUrl in web.config? If so, what's the maximum value supported? What should I do to fix this error?

The GET request should never be this long. You need to change it to POST method instead since it was designed to transmit block of data such as forms.

An excerpt from the RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1:

The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. POST is designed to allow a uniform method to cover the following functions:

  • Annotation of existing resources;

  • Posting a message to a bulletinboard, newsgroup, mailing list, or similar group of articles;

  • Providing a block of data, such as the result of submitting a form, to a data-handling process;

  • Extending a database through an appendoperation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM