asp.net - 网址中出现点号错误

标签 asp.net error-handling url-routing

我有一个带有http://www.example.com/2/2332/example之类网址的路由页面
现在,当我在URL http://www.example.com/2/2332/example中输入句号时。我被带到服务器错误页面:

HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.



我想重定向到同一页面http://www.example.com/2/2332/example或我的自定义404错误页面http://www.example.com/404.aspx

我尝试调试,但未在Global.asax.cs中击中Application_Error事件。

对解决这个问题有帮助吗?

最佳答案

没有遇到断点,因为它不是asp.net错误。这是IIS错误。您必须modify web.config重定向到自定义错误页面。

关于asp.net - 网址中出现点号错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16336119/

相关文章:

c# - 在代码隐藏中使用 AJAX 错误传递 json 对象

asp.net - 如何检查 MailMessage 是否已在 .NET 中传递?

swift - 如何为 completionHandler 引发错误?

javascript - 名为 `index` 错误的重复路由

python - Django Rest Framework 路由器 URL 中的多个整数参数

css - Bootswatch 主题无法正常工作

javascript - 动态添加点击事件到复选框,仅适用于第一个复选框JQUERY

python - "AttributeError: ' Turtle ' object has no attribute ' colormode '"尽管 Turtle.py 具有 colormode 属性

angular - 使用 Material Design 的 Angular2 应用程序的一般错误处理程序

c# - 如何将 URL example.com/root/login 映射到 example.com/login?