Click here to Skip to main content
12,546,962 members (57,386 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked

Error (Visual Studio 2013, MVC5): The request filtering module is configured to deny a request where the query string is too long

, 8 Aug 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Fix "the query string is too long" error in Visual Studio 2013.


When running a MVC5 application in Visual Studio 2013, you may encounter this error. The detailed error information displayed in browser is shown below:


HTTP Error 404.15 - Not Found
The request filtering module is configured to deny a request where the query string is too long.

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

Things you can try:
Verify the configuration/system.webServer/security/requestFiltering/requestLimits@maxQueryString setting in the applicationhost.config or web.config file.

The error occurs particularly when IIS Express, the default web server in Visual Studio 2013, is used.

Steps to Reproduce the Error

Start Visual Studio 2013, and click on File – New – Project…

In the New Project dialog box, click Web on the left pane and ASP.NET Web Application on the right pane, give a project name and then OK.

New project

On the next New ASP.NET Project dialog box, select MVC template and select Individual User Accounts as authentication method. If the Individual User Accounts is not already selected, click the Change Authentication button to change it. Click Ok button.

After the project is created, press F5 to run it. The error occurs.

How to Fix

In the “Things you can try” section of the error message, it suggests to increase the maxQueryString length in configuration settings. This suggestion might work in some cases, but certainly did not work for me. It turns out that the error is caused by inappropriate settings in project properties. Look at the screen shot of the project properties below in which the Windows Authentication is “Enabled” and the Anonymous Authentication is Disabled”. 


Not sure why the Windows Authentication is “Enabled” while the “Individual User Accounts”, which refers to Form Authentication, is selected during the initial project creation. The fix is easy, by simply changing the Windows Authentication to “Disabled” and the Anonymous Authentication to “Enabled”.



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
United States United States
Web & Database Developer. Design and implement web and database applications utilizing Microsoft and other development tools.

You may also be interested in...


Comments and Discussions

QuestionAnother reason Pin
gchq1-Nov-14 9:20
membergchq1-Nov-14 9:20 
QuestionThanks! Pin
j-on18-Oct-14 6:11
memberj-on18-Oct-14 6:11 
AnswerRe: Thanks! Pin
Tomz_KV20-Oct-14 2:30
memberTomz_KV20-Oct-14 2:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.161018.1 | Last Updated 8 Aug 2014
Article Copyright 2014 by Tomz_KV
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid