IE 8 中的 Response.Redirect 奇怪行为

发布于 2024-09-30 07:18:26 字数 851 浏览 1 评论 0原文

这是我使用 Response.Redirect 的场景。

基础网站使用 httpwebrequest 向第三方网站调用 SSO - 获取密钥。 一旦基础网站获得密钥,基础网站就会将客户端浏览器重定向到具有密钥的第三方网站。

奇怪的事情:

假设网站 URL 是这样的 http://basewebsite/SSO/ThridpartySSO.aspx 第三方重定向 URL 为 http:// /thirdparty/Incoming/IncomingSSO.aspx?key=ASFDSFWERASDFASDF

完成 httpwebrequest 并获取密钥后,我所做的就是

Response.Redirect("http://thirdparty/Incoming/IncomingSSO.aspx?key=" + key);

它在所有浏览器中始终有效,除了 IE8,非常零星,我得到页面无法显示为这样的 URL

http://basewebsite/Incoming/IncomingSSO.aspx?key=ASFDSFWERASDFASDF

请注意,上述 URL 中的域名是基本网站的 ..但 URL 的其余部分是第三方网站的。

不明白为什么,非常感谢任何帮助。

Here is the scenario where I'm using Response.Redirect..

Base website calling a SSO using httpwebrequest to third party website - Get a key.
Once base website get's the key - base website redirects the client browser to the third party website with the key.

Weird thing:

Let's say the website URL is like this http://basewebsite/SSO/ThridpartySSO.aspx
The third party redirect URL is http://thirdparty/Incoming/IncomingSSO.aspx?key=ASFDSFWERASDFASDF

After doing the httpwebrequest and getting the key all I'm doing is

Response.Redirect("http://thirdparty/Incoming/IncomingSSO.aspx?key=" + key);

It works all the time in all browsers, except in IE8, very sporadic, I get page cannot be displayed with a URL like this

http://basewebsite/Incoming/IncomingSSO.aspx?key=ASFDSFWERASDFASDF

Notice that the domain name in the above URL is base website's .. but the rest of the URL is third party website's.

Can't figure out why, Any help is much appreciated.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

帅气称霸 2024-10-07 07:18:26

尝试使用 follow

Response.Redirect("your third party url", false);

it 将客户端重定向到新 URL。指定新 URL 以及当前页面的执行是否应终止。

Try using following

Response.Redirect("your third party url", false);

it Redirects a client to a new URL. Specifies the new URL and whether execution of the current page should terminate.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文