多个帐户,以一个网站应用程序 [英] Multiple accounts to a website application

查看:121
本文介绍了多个帐户,以一个网站应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

我的问题是我只能用一个用户帐户进行身份验证,所有线程都连接到同一个帐户,因为该网站使用Cookie来存储会话ID。我怎么可以存储多个会话,从不同的浏览器模拟验证?

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?

任何建议,欢迎。

推荐答案

这是因为现有的会话合并政策present在Internet Explorer不可能的 - web浏览器是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.

要去解决这个问题,你将不得不进一步去比单纯使用的控制,而是访问IE浏览器在一个较低的水平。

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

这篇关于多个帐户,以一个网站应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆