插件 Express RTD 刷新问题

发布于 2025-01-08 09:23:10 字数 534 浏览 6 评论 0原文

Excel AddIn 使用 Add-In Express、VS2010、cometd.net 与 cometd 服务器和 Tom cat 通信 在 RTDInitialize 事件处理程序中,我登录 Tom Cat 并连接到 cometd 服务器,我使用类凭据的实例来记住它已登录(将 IsLoggedOn 设置为 true)和 sessionID。

在主题的 RefreshData 处理程序中,如果尚未注册,我将注册到 cometd 服务器。然后我会订阅汤姆猫的主题。现在,当用户从 Excel 中删除 RTD 函数时, DisconnectData 处理程序被调用,在其中我断开与 cometd 服务器的连接,从 Tom Cat 注销,清除 sessionID。 下次,当用户再次进入 RTD 功能时,它将调用 RTDInitialize 事件处理程序,登录并连接,其中 IsLoggoned 设置为 true,并且更新 sessionID。奇怪的是,第二次登录后,在刷新数据中,我检查凭据,IsLogged 变为 false,并且 sessionID 为空,就像第一次注销时一样。有人知道为什么吗?不确定我是否说清楚了。谢谢

Excel AddIn using Add-In express, VS2010, cometd.net talks to cometd server and Tom cat
In RTDInitialize event handler, I log in Tom Cat and connect to cometd server, I use an instance of class credential to remember it is loggedOn(set IsLoggedOn to true) and sessionID.

In RefreshData handler of topic, I will register to cometd server if not register yet. Then I will subscribe topic to Tom Cat. Now when users delete the RTD function from Excel,
DisconnectData handler is called, in it I disconnect from cometd server, logout from Tom Cat, clear out sessionID.
Next time, when users enter RTD function again, it will call RTDInitialize event handler, login and connect where IsLoggoned set to true and sessionID is updated. The strange thing is after 2nd time login, in refreshData, I check the credentials, IsLogged becomes false and sessionID is empty just like what it was at first logout. Anyone know why? not sure if I make it clear. Thanks

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

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

发布评论

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

评论(1

堇色安年 2025-01-15 09:23:10

我想你的测试中只有一个主题。我假设您在 RTD 服务器模块的类级别上存储了对“类凭据实例”的引用。当你删除主题时,RTD服务器模块将被销毁;这会删除有关先前连接的信息。如果您认为我误解了这个问题,请澄清。

I suppose you have just one topic in your tests. I suppose that you store a reference to the "instance of class credential" on the class level of the RTD server module. And when you delete the topic, the RTD server module is destroyed; this kills the information about previous connection. If you think that I misunderstood the problem, please clarify.

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