Flex RemoteObject .Net 会话混合

发布于 2024-07-15 03:59:02 字数 432 浏览 7 评论 0原文

好吧,这个真的很奇怪。 我使用 .net 作为后端,使用 Flex 作为前端。 我还使用 WebOrb.Net 来管理我的 RemoteObject 调用。

当用户第一次打开我的 Flex 应用程序时,我会回调 .Net 并将一些设置保存在会话变量中,以便所有后续对 .Net 的请求都可以从会话中提取这些值,因此我不需要每次都通过它们。 现在,在 .Net 端,我有一个模型,我将这些值存储在其中,然后将模型自身保存到会话中。 因此,任何 .Net 类都可以在需要时获取模型的静态引用,并且该引用将从会话中加载值。

如果我只有一个用户使用该应用程序,一切都会很好! 如果我有两个用户同时使用该应用程序,我们就会开始遇到问题。 用户 A 将开始获取用户 B 的设置。这怎么可能。 我认为会话对于用户来说应该是唯一的。

如果有人能在这方面提供一些帮助,那就太棒了!

Okay, this one is REALLY weird. I'm using .net for my backend and Flex for my front end. I'm also using WebOrb.Net to manage my RemoteObject calls.

When the user first opens up my Flex app I make a call back to .Net and save a few settings in a session variable so that all subsequent requests to .Net can just pull these values out of the session and thus I don't have to pass them every time. Now on the .Net side I have a model that I stored these values in and then I have the model save itself to the session. So any .Net class can get a static reference to the model whenever it needs it and that reference will load the values out of the session.

If I just have one user using the app everything works great! If I have two users using the app simultaneously we start to run into issues. User A will start to pick up the settings for User B. How is this even possible. I thought sessions were supposed to unique to the user.

If anyone could offer some assistance on this one that would be AMAZING!

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

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

发布评论

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

评论(1

偏爱自由 2024-07-22 03:59:03

您的问题可能出在处理静态对象的方式上。 因为它是静态的,所以只有一个静态对象在所有会话之间共享。 当您设置变量时,您可能会无意中覆盖每个会话中的值。 您能否发布一些代码,我们可以进一步分析您如何设置变量?

Your problem might be in the way you are dealing with the static object. Because it is static, there is only one static object that is shared across all sessions. You might be in inadvertently overwriting its values within each session when you set the variables. Can you post some code that we can further analyze how you are setting there variables?

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