网站应用程序的多个帐户

发布于 2024-11-18 11:22:40 字数 204 浏览 3 评论 0原文

我有一个用 C# 编写的 WindowsForms 应用程序,它启动多个线程,用于使用不同用户的帐户登录网站。我使用 WebBrowser 控件从登录页面导航到主页。

我的问题是我只能使用一个用户帐户进行身份验证,所有线程都连接到同一帐户,因为该站点使用 cookie 来存储 sessionID。如何存储多个会话来模拟来自不同浏览器的身份验证?

欢迎任何建议。

I have an WindowsForms application written in C# which starts a number of threads for logging in on a site with different users' accounts. I use a WebBrowser control to navigate from the login page to the main page.

My problem is I can only authenticate with one user account, all threads are connected to the same account because the site uses cookies to store a sessionID. How can I store multiple sessions to simulate the authentication from different browsers?

Any suggestions are welcome.

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

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

发布评论

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

评论(1

看轻我的陪伴 2024-11-25 11:22:40

这是不可能的,因为 Internet Explorer 中存在现有的会话合并策略 - WebBrowser 是 IE 的模拟层,因此它遵循相同的原则。可以阅读有关该主题的好文章 这里

要解决此问题,您需要比简单地使用控件更进一步,而是在较低级别上访问 IE。

It is not possible because of existing session merging policies present in Internet Explorer - WebBrowser is the IE's emulation layer, so it abides to the same principles. A good read on the topic is available here.

To go around this issue, you will have to go further than simply using the control, but rather access IE on a lower level.

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