我有一个带有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/