1

From an HTTP request with a loooong query string - 2847 in this case -, I got back error 404.15 with the following message:

Überprüfen Sie die Einstellung "configuration/system.webServer/security/requestFiltering/requestLimits@maxQueryString" in der Datei "applicationhost.config" oder "web.config".

In English:

Check the "configuration/system.webServer/security/requestFiltering/requestLimits@maxQueryString" setting in the "applicationhost.config" or "web.config" file.

I did this, by following the documentation and changing the maximum query string length from 2048 to 4096 characters.

Evidently, the above change has had an effect, as the original error message is gone.

Instead, I am now getting another error, still related to the maximum query string length. This time, it comes with HTTP code 400 and says:

Die Länge der Abfragezeichenfolge für die Anforderung überschreitet den konfigurierten maxQueryStringLength-Wert.

In English:

The query string length of the request exceeds the configured maxQueryStringLength value.

Now, I have scanned all *.config files on my entire disks for any occurrences of the substring maxQueryString. There is only one such occurrence in total, and it is the Web.config file for my IIS default website, which says

<requestLimits maxQueryString="4096" /> 

Hence, something else must be influencing the maximum query length - where else can this setting me configured?

1
  • Check the event log on the server, it may shed more light. You have to identify which web.config needs to be updated -- and there likely WON'T be a maxQueryStringLength there, and it will need to be created. The entry in the web.config should look something like: <httpRuntime maxRequestLength="2097151" maxUrlLength="2048" maxQueryStringLength="10240" /> Commented Apr 16, 2020 at 16:45

1 Answer 1

4

first, make sure you enabled the anonymous authentication in iis:

set below code in web.config file:

<system.web> <httpRuntime maxUrlLength="10999" maxQueryStringLength="2097151" /> …… </system.web> <system.webServer> <security> <requestFiltering> <requestLimits maxUrl="10999" maxQueryString="2097151" /> </requestFiltering> </security> </system.webServer> 

Note: set value a little bit higher than your requirement. above mentioned is just an example. set this value in the root folder config file. and restart iis after doing changes.

Sign up to request clarification or add additional context in comments.

3 Comments

Setting both values as described here appears to solve the problem, thank you (will accept i a moment) :) I'm not sure why anonymous authentication is relevant here, though.
@O.R.Mapper if your issue is resolved then I request you mark the suggestion as an answer it will help other people who face similar issue.
I will, see "will accept i a moment" in my previous comment - as soon as my co-worker has confirmed that this works on their system, as well.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.