HTTP错误404.15-找不到 [英] HTTP Error 404.15 -Not Found

查看:139
本文介绍了HTTP错误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

我的项目是Visual Studio 2013上的MVC4

My Project is MVC4 on Visual Studio 2013

我确定的内容正确无误并已尝试.

things I have made sure are correct and tried.

  • 我的课程没有[AllowAnonymous] Attr,没有[Authorize] Attr.
  • 我已在配置文件中添加了maxQueryStringLength ="32768" maxUrlLength ="65536"
  • 我已添加 ->
  • 我在控制器中的操作"登录上具有[AllowAnonymous] attr.

  • There is no [Authorize] Attr on my classes with [AllowAnonymous] Attr.
  • I have added maxQueryStringLength="32768" maxUrlLength="65536" to in my config file
  • I have added -->
  • I have [AllowAnonymous] attr on my log on Actions in my controller.

在Visual Studio上以调试模式或没有调试模式运行应用程序时,我没有问题.

I have no problem when I run the application in debug mode or without debug mode on Visual Studio.

这是我的溃败配置 route.MapRoute( 名称:默认", url:"{controller}/{action}/{id}", 默认值:new {controller ="Home",action ="Index",id = UrlParameter.Optional} );

here is my rout config routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );

这是我在Web服务器上遇到的错误

this is the error I am getting on the web server

推荐答案

像下面的示例一样插入/更新web.config文件

<configuration>
   <system.webServer>
       <security>
          <requestFiltering>
             <requestLimits maxQueryString="3000" maxUrl="1000" />
          </requestFiltering>
       </security>
   </system.webServer>
   <system.web>
       <httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
   </system.web>
</configuration>

这篇关于HTTP错误404.15-找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆