return View() and return PartialView() mystery MVC5
I'm using MVC 5 with Identity 2.0 for security. When I start the application it displays login page (without layout probably because I'm returning partial view). When I use return View() instead of return PartialView() it gives me 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 enabled both windows and Anonymous authentication of website but it is not working. My action for login is
[AllowAnonymous]
public ActionResult Login(string returnUrl)
{
ViewBag.ReturnUrl = returnUrl;
return PartialView();
}
your issue it's not the MVC code it's more an IIS configuration take a look at the following link
http://www.iis.net/configreference/system.webserver/security/requestfiltering/alwaysallowedquerystrings
链接地址: http://www.djcxy.com/p/7260.html上一篇: 查询字符串太长