HTTP Error 404.15
The request filtering module is configured to deny a request where the query string is too long.
I am having above error, and I have been trying almost everything but no luck
My Project is MVC4 on Visual Studio 2013
things I have made sure are correct and tried.
I have [AllowAnonymous] attr on my log on Actions in my controller.
I have no problem when I run the application in debug mode or without debug mode on Visual Studio.
here is my rout config routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );
this is the error I am getting on the web server
As the error message tells you
The request filtering module is configured to deny a request where the query string is too long.
At the screenshot you can clearly see that the returnUrl
Parameter is huge.
So there are to solutions
Clear your returnUrl
Parameter in your Controller Method [HttpPost] Login();
Add the following to your web.config
:
web.config
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="*"/> <!-- Replace * with any number, which is required -->
</requestFiltering>
</security>
</system.webServer>
In your case go definitively with Solution 1. It's simply a bug in your Code and easily fixed without touching the IIS or other config files.
See this post for more information about Request Query String Limit.
链接地址: http://www.djcxy.com/p/42040.html上一篇: Windows Azure WebSites maxQueryStringLength
下一篇: HTTP错误404.15