ASP.NET MVC中的URL长度 - 260+个字符给出错误请求 - 无效的URL

Sha*_*Sha 4 asp.net url asp.net-mvc azure asp.net-mvc-4

我的网址超过260个字符有问题

  • ASP.NET MVC 4.0
  • Umbraco CMS
  • Azure Websites

IIS扼流并抛出以下错误:

错误请求 - 无效的网址

HTTP错误400.请求URL无效.

示例网址:

http://example.com/article/123/some-headline-longer-than-260-characters-with-only-text-and-numbers-used

就我而言,URL长度为303个字符,没有任何查询字符串.将URL缩短为260个字符可以解决问题,但对我来说这不是一个可行的解决方案.由于我使用ASP.NET,我添加了以下内容web.config- 但是,问题仍然存在maxUrlLength="1024":

<?xml version="1.0"?>
   <configuration>
      <system.web>
         <httpRuntime 
              requestValidationMode="4.0" 
              requestPathInvalidCharacters="&lt;,&gt;"
              maxUrlLength="1024" 
              maxQueryStringLength="768" 
              relaxedUrlToFileSystemMapping="true" />
      </system.web>
   </configuration>
Run Code Online (Sandbox Code Playgroud)

其他信息:我的所有网址都保持在2000-theh限制之下(参见不同浏览器中网址的最大长度是多少?)

有任何想法吗?

Art*_*tak 5

您可能需要在注册表中扩展限制:http://support.microsoft.com/kb/820129