如何修复400 Bad Request [英] How to fix 400 Bad Request

查看:87
本文介绍了如何修复400 Bad Request的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



在我的MVC应用程序中,action参数是通过url传递的。

当我输入值%in然后它转到400 Bad Request Page。我想在错误页面重定向,所以它怎么可能。



请建议。

Hi Everybody,

In my MVC application the action parameter is passing through url.
When i am entering the value % in URL then it goes to 400 Bad Request Page. I want to redirect in error page so how can it possible.

Pls suggest.

推荐答案

嗯,%(百分号)是一个用过的字符用于网址编码(请阅读 http://en.wikipedia.org/wiki/Percent-encoding [ ^ ]),所以你不能单独使用它。要了解您的错误,了解百分号后面的内容非常重要,因为这是编码信息。比如%20是一个空格字符,%23是#,依此类推...



希望你没有错误的哈希(#)可以,并经常用于在网址中路由!



希望这有助于
Well, a "%" (percent sign) is a character used for url encoding (read this http://en.wikipedia.org/wiki/Percent-encoding[^]), so you can not us it on its own. To understand your error it is important to know what comes after the percent sign, because this is the encoded information. like %20 is a space character, %23 is a #, and so on...

hopefully you are not mistaken with the hash (#) which can, and often is used for routing in an url!

hope this helps


ASP.NET中的自定义错误 [ ^ ]

请完成本文,然后您可以将用户重定向到您设计的默认未找到页面。

谢谢

:)
Custom Errors in ASP.NET[^]
Please go through this article and then you can redirect the user to a default Not Found page designed by you.
Thanks
:)


这篇关于如何修复400 Bad Request的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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