I was getting 404 errors for some long URLs on the website I am developing. After a little digging, I found that this happens when the length of certain aspects of the URL exceeds custom limits in IIS7. In this case, the maxQueryString attribute of the requestLimits property must be increased in the web.config file
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="4096" maxAllowedContentLength="4096" maxUrl="8192" >
</requestLimits>
</requestFiltering>
</security>
This instantly fixed the problem on my development server, but on the remote server I now get:
500 - Internal server error.
There is a problem with the resource you are looking for, and this cannot be displayed.
And that all the information he gives me.
source
share