I have problems with URLs exceeding 260 characters in
- ASP.NET MVC 4.0
- Umbraco CMS
- Azure Websites
IIS chokes and throws the following error:
Bad Request - Invalid URL
HTTP Error 400. The request URL is invalid.
Example URL:
In my case, the URL is 303 characters long without any querystring. Shortening the URL to 260 chars resolve the problem but for me it is not a viable solution. Since I am using ASP.NET I added the following to web.config - however, the problem remain even with maxUrlLength="1024":
<?xml version="1.0"?>
   <configuration>
      <system.web>
         <httpRuntime 
              requestValidationMode="4.0" 
              requestPathInvalidCharacters="<,>"
              maxUrlLength="1024" 
              maxQueryStringLength="768" 
              relaxedUrlToFileSystemMapping="true" />
      </system.web>
   </configuration>
Additional info: All my URLs are kept below the 2000-ish limit (cf. What is the maximum length of a URL in different browsers?)
Any ideas?
 
    