简体   繁体   English

414.请求的URL太长。 网

[英]414. The request URL is too long. asp.net

I'm getting the error "HTTP Error 414. The request URL is too long."我收到错误“HTTP 错误 414。请求 URL 太长。” 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-longhttp://www.mytecbits.com/microsoft/iis/query-string-too-long

In web.config, I have maxQueryStringLength="2097151".在 web.config 中,我有 maxQueryStringLength="2097151"。 Is this the maximum value?这是最大值吗? In order to solve this problem, should I set maxUrl in web.config?为了解决这个问题,我应该在 web.config 中设置 maxUrl 吗? If so, what's the maximum value supported?如果是这样,支持的最大值是多少? What should I do to fix this error?我应该怎么做才能修复这个错误?

The GET request should never be this long. GET 请求永远不应该这么长。 You need to change it to POST method instead since it was designed to transmit block of data such as forms.您需要将其更改为 POST 方法,因为它旨在传输表单等数据块。

An excerpt from the RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1: RFC 2616 的摘录:超文本传输​​协议——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 方法用于请求源服务器接受请求中包含的实体,作为 Request-Line 中 Request-URI 标识的资源的新下级。 POST is designed to allow a uniform method to cover the following functions: POST 旨在允许统一的方法涵盖以下功能:

  • 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.通过追加操作扩展数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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