ASP .NET 丢失页面之间的会话

发布于 2024-11-02 16:53:41 字数 562 浏览 4 评论 0原文

我遇到了一个奇怪的错误,在页面之间移动时我丢失了会话。

我刚刚弄清楚为什么会发生这种情况,但可以弄清楚如何解决它。

我丢失了会话,因为我使用 Flash (swf) 菜单在页面之间导航。

因此,当我使用 Flash 菜单导航到页面时,我会丢失会话。

有办法解决吗?

-----------------------编辑----------------------------------

它不允许我回答我自己的问题,所以这里是答案:

感谢回答,但问题不是闪光灯。

我刚刚发现会话是在 http://WebSite.com/ Flash 被重定向到 http://www.WebSite.com/

因此会话在域之间丢失,并且由于闪存的原因,不在页面之间:) 我刚刚让我的所有网站都使用 www 域。

谢谢, 担

I encountered a weird error, I lose sessions when moving between pages.

I just figured out why it heppends, but can figure out how to fix it.

I lose Sessions because i use Flash (swf) menu to navigate between pages.

So when i navigate to a page using the Flash menu, I lose the session.

Any way to fix it?

-----------------------EDIT----------------------

It doesn't let me answer my own question so here is the answer:

Thx for answering, but the problam wasn't the flash..

I just found out that the session was opened on http://WebSite.com/
And the flash was redirecting to http://www.WebSite.com/

So the session losts between domains, and not between pages because of flash :)
I just made all my site use the www domain .

Thanks,
Dan

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

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

发布评论

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

评论(3

蘸点软妹酱 2024-11-09 16:53:41

发生这种情况的原因是 Flash 没有随请求一起发送 ASP.NET cookie,因此当 Flash 发出请求时 ASP.NET 不知道您是谁。

我认为浏览器将 flash 插件视为一个单独的实例,因此它有自己的会话。

以下是一些背景信息:

http://swfupload.org/forum/generaldiscussion/98

编辑:发现这个问题也可能有帮助:

如果 Flash 将照片上传到 aspx 页面,会话会有所不同

The reason this is occurring is because flash is not sending the ASP.NET cookie along with the request so ASP.NET has no clue who you are when the request is being made by flash.

I think the browser considers the flash plugin as a seperate instance so it has it's own session.

Here is some background:

http://swfupload.org/forum/generaldiscussion/98

EDIT: Found this SO question that might be of help as well:

Session is different if flash uploads photo to the aspx page

再见回来 2024-11-09 16:53:41

感谢您的回答,但问题不是闪光灯。

我刚刚发现会话是在 http://WebSite 上打开的。 com/ 并且 Flash 被重定向到 http://www.WebSite.com/

所以会话在域之间丢失,而不是在页面之间丢失,因为flash :) 我刚刚让我的所有网站都使用 www 域。

谢谢,丹

Thx for answering, but the problam wasn't the flash..

I just found out that the session was opened on http://WebSite.com/ And the flash was redirecting to http://www.WebSite.com/

So the session losts between domains, and not between pages because of flash :) I just made all my site use the www domain .

Thanks, Dan

最初的梦 2024-11-09 16:53:41

尝试使用 fiddler2 检查 html header,并查看当您使用 flash 菜单导航到新页面时,身份验证令牌是否仍然相同。

http://www.fiddler2.com/fiddler2/

Try using fiddler2 to check html header and see if the auth token is still the same when you navigate to a new page using the flash menu.

http://www.fiddler2.com/fiddler2/

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