Application_AuthenticateRequest RawUrl 中的 Response.Redirect

发布于 2024-08-17 02:18:15 字数 364 浏览 3 评论 0原文

我在 global.asax.cs 中使用 Response.Redirect。 当页面加载时,RawUrl 属性包含某种编码目录。

"/(F(D7zFAWNl_SpT-cuyRXksIZnvwBB_bYfBl3ens83McZjPg9zLBvcjvik6FkwBNhnjeK-faeUt6PUYOZSsYXKdg4hi4IDPTDO5diQf693NLpw1))/Integration/Workflow.aspx"

这个可怕的目录来自哪里? 它破坏了目标页面上使用 RawUrl 获取路径信息的一堆用户控件。

为什么 Response.Redirect 会发明这条可怕的路径并添加它? 有什么办法解决这个问题吗?

谢谢克雷格

I am using a Response.Redirect in global.asax.cs.
When the page loads the RawUrl property contains an encoded directory of some kind.

"/(F(D7zFAWNl_SpT-cuyRXksIZnvwBB_bYfBl3ens83McZjPg9zLBvcjvik6FkwBNhnjeK-faeUt6PUYOZSsYXKdg4hi4IDPTDO5diQf693NLpw1))/Integration/Workflow.aspx"

Where does this horrible directory come from?
It's breaking a bunch of user controls on the target page which use the RawUrl to get path information.

Why would Response.Redirect invent this horrible path and add it?
Is there any way around this?

Thanks

Craig

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

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

发布评论

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

评论(2

戏剧牡丹亭 2024-08-24 02:18:15

"(F(D7zFAWNl_SpT-cuyRXksIZnvwBB_bYfBl3ens83McZjPg9zLBvcjvik6FkwBNhnjeK-faeUt6PUYOZSsYXKdg4hi4IDPTDO5diQf693NLpw1))" 是您的会话 ID 或身份验证。 id 存储在您的 URL 中而不是 cookie 中。您可以在 web.config 文件中更改此设置

"(F(D7zFAWNl_SpT-cuyRXksIZnvwBB_bYfBl3ens83McZjPg9zLBvcjvik6FkwBNhnjeK-faeUt6PUYOZSsYXKdg4hi4IDPTDO5diQf693NLpw1))" is your session id or auth. id stored in your URL and not in a cookie. You can change this in your web.config file

幽蝶幻影 2024-08-24 02:18:15

它是从 web.config 中获取的设置,如下位置所示;

<authentication mode="Forms">
  <forms loginUrl="~/en/Access/Login" defaultUrl="~" cookieless="UseUri" timeout="2880" />
</authentication>

如果您设置 cookieless="UseUri",您的会话详细信息将附加到您的 URL,而不是存储在 Cookie 中。

设置 cookieless="UseCookies" 或删除 cookieless 属性以使用 cookie 而不是 URL 来获取会话详细信息

It is the setting that is taken from the web.config as in the following location;

<authentication mode="Forms">
  <forms loginUrl="~/en/Access/Login" defaultUrl="~" cookieless="UseUri" timeout="2880" />
</authentication>

If you set cookieless="UseUri", your session details will be appended to your URL instead of storing in a cookie.

Set cookieless="UseCookies" or remove the cookieless attribute to use cookie instead of URL for session details

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