与不同的用户代理保持相同的会话
有没有办法在不同的用户代理上使用相同的会话。 我有一个 flash 应用程序,它在将数据发布到 myHandler.ashx 时生成新的会话 id(在 aspx 上也会发生同样的情况)。 我在这里错过了一个技巧吗?
Is there a way to use the same session on different user-agents. I have a flash app that is generating a new session id on posting data to myHandler.ashx ( same happens on aspx ). Am i missing a trick here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看一下 swfupload 及其在 ASP.Net 中的实现 - 他们使用
Global.asax
破解以保持相同的会话。Take a look at swfupload and their implementation in ASP.Net - they use a
Global.asax
hack in order to keep the same session.我没有 c# 或类似的经验,但是当使用 amfphp 进行远程处理时,有时需要在调用中手动提供 session_id 变量,因为服务器会出于某种原因认为您是两个不同的用户,即使它都经过相同的浏览器。
通常,最简单的方法是在加载 swf 时在 flashvar 中提供 id。 这将要求您在 html 源中打印 session_id,这并不理想,但也没什么大不了的,因为无论如何它都可以很容易地被嗅探到。
I have no experience from c# or anything like that, but when doing remoting using amfphp you will sometimes need to supply the session_id variable in your call manually, as the server will for some reason consider you two different users even though it's all going through the same browser.
Often, the simplest way to do this is to supply your swf with the id in a flashvar when loading it. This will require you to print the session_id in the html source, which isn't ideal, but it's not that big of a deal since it can be sniffed very easily anyway.
通过 flash 变量传递会话 ID 似乎很常见。 我自己还没有这样做,但使用这些键进行快速谷歌搜索似乎发现了一些有希望的命中:保持会话数据闪存
It appears as though it is common to pass the session id through flash vars. I have not done this myself, but a quick Google search with these keys seems to find some promising hits: keep session data flash