'How to solve HTTP Error 404.15 Not Found error in asp.net?

My ASP.NET MVC application is running on Windows Server 2012 R2, recently the server got a group policy and software update then server restarted. Since then the application gives following error.

HTTP Error 404.15 Not Found

The request filtering module is configured to deny a request where the query string is too long

I followed a few other threads for same issue, when I change maxQueryString to 1024 the application url got 1024 bytes of query string.

I even changed the web.config file to change the max query string. None of it worked - I'm still getting the same error.

What can I do to resolve this issue?



Solution 1:[1]

You can try the following methods:

  1. Clear your returnUrl Parameter in your Controller Method [HttpPost] Login();

  2. Add the following to your web.config:

    <configuration>
      <system.webServer>
        <security>
          <requestFiltering>
            <requestLimits maxQueryString="3000" maxUrl="1000" />
          </requestFiltering>
        </security>
      </system.webServer>
      <system.web>
        <httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
      </system.web>
    </configuration>
    

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 samwu