ASP.NET MVC - 路径中的非法字符 - 从 Application_Error 重定向

发布于 2024-09-25 02:04:32 字数 250 浏览 0 评论 0原文

不幸的是,在我的应用程序中,我生成了一些包含“(双引号)的网址。 我更正了网址,但谷歌机器人已经索引了错误的网址。

现在我经常遇到以下异常: System.ArgumentException:路径中存在非法字符。

我唯一能捕获错误的地方是 Global.asax 中的 Application_Error - 我清理了那里的 url 并尝试重定向到正确的 url - 不幸的是它不起作用...应用程序没有重定向,我不这样做不知道为什么...有什么建议吗?

In my application I generated few url which contained " (double quotes), unfortunately.
I corrected the url's but google bot already indexed wrong urls.

Now I get quite often following exception:
System.ArgumentException: Illegal characters in path.

The only one place I can catch the error is the Application_Error in the Global.asax - I clean up the url over there and try to redirect to correct url - unfortunately it is not working... The application is not redirecting and I don't know why... Any suggestions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文