0

Wwhat is the problem with the code below?

<authentication mode="Windows" />
<authorization>
   <deny users="?"/>
</authorization>

When I run my project it gives me this error:

Request filtering is configured on the Web server to deny the request because the query string is too long.

I already disabled the Anonymous Authentication and enabled the Windows Authentication in my IIS.

1 Answer 1

0

Have You tried increasing the maximum querystring size by setting the maxQueryString attribute on the requestLimits element ?

<system.webServer>
  <security>
<requestFiltering>
      <requestLimits maxQueryString="32768"/>
    </requestFiltering>
  </security>
</system.webServer>
<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
Sign up to request clarification or add additional context in comments.

2 Comments

Hi Pratik. Thanks for the response, but I think setting maxquerystring is not the answer to the error. when I try to load my page it always redirects me to ".../Account/Login?ReturnUrl=%2FPIAlarmAndEvent%2FAccount%2FLogin%3 ..........." that's why it gives me "Request filtering is configured on the Web server to deny the request because the query string is too long." error. do you have any idea with the authorization and authentication in web.config?
I just want my web app to be in a windows authentication mode and can only access by non-anonymous users that's why I wrote those code in web.config.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.