使用冒号(:)返回URL与窗体身份验证("对于请求重定向指定的返回URL无效") [英] Using a colon (:) in return URL with Forms Authentication ("The return URL specified for request redirection is invalid")

查看:199
本文介绍了使用冒号(:)返回URL与窗体身份验证("对于请求重定向指定的返回URL无效")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误的请求重定向指定的返回URL无效使用窗体身份验证时。我发现<一个href=\"http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/cf27c390-07b1-4a48-b337-130a8e220069\"相对=nofollow>此线程的说,这是一个已知的问题包含冒号回报的URL(我确实包含了一些)。

I am getting the error "The return URL specified for request redirection is invalid" when using forms authentication. I found this thread that says this is a known issue with return URLs that contain colons (mine indeed contains a few).

在该线程的解决方法是捕获错误并使用默认返回URL ......难以接受的解决方案。我可以尽量避免在URL中的冒号,但是这是一个有点疼痛。

The workaround in that thread is to catch the error and use a default return URL ... hardly an acceptable solution. I can try to avoid colons in URLS, but that's a bit of a pain.

难道还有其他选择吗?

推荐答案

结肠是保留字符,每的 URI RFC 。你不能把一个unen codeD 的URI,时间的查询或散列

The colon is a reserved character, per the URI RFC. You can't put an unencoded : in the query or hash of a URI, period.

所以,你需要%克斯code结肠。

So you need to %-encode the colon.

这篇关于使用冒号(:)返回URL与窗体身份验证(&QUOT;对于请求重定向指定的返回URL无效&QUOT;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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