Proxy for Web Browser component

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hy,
Im trying to make a load simulator for my site (to simulate a given number of users browsing the site).
I was planing to do this in a thread fashion, where each thread contains a web browser component and represents a user.
Now the first problem is that id like for each "user" to use a different proxy, but the only way i found to use a proxy is to set the global proxy settings for IE witch is not what i need, i need each thread to have its own proxy settings and preferably not touch the IE settings as id like to use IE with my direct connection as this app is running in the background.
Second, some of the requests need to have the postdata attached to them, edited to work correctly. the SHDocVw.axWebBrowser has an event called BeforeNavigate2 in witch it is possible to edit the postdata before the request is sent to the server. I have failed to find out how to do this with the Windows.Forms.WebBrowser component.
There is also the httpWebRequest class, however this dosent trigger the download of media such as images and othere content becouse it dosent build the page it receives in the Response so this dosent do a good job of simulating a user, therefore im not using this to build my user thread.
Im open to use any one of the above mentioned components to build my thread or any othere component witch fill these needs:
1.must suport proxy settings at a thread level
2.must suport postdata editing before the request is sent
3.must triger the download of media and all necessary content of the page (however a visual rendering is not needed)
The httpWebRequest class fails nr. 3 and it seems like to much of a pain to get that working.
The Windows.Forms.WebBrowser component satisfies nr 3 but i have yet to figure out how to edit the outgoing postdata and how to set the poxy settings only for this component/thread
The older SHDocVw.axWebBrowser satisfies boght nr 2 and 3 but i have yet to figure out how to set the proxy settings only for this component/thread
The quickest way i see, is to figure out how to get the proxy settings for the SHDocVw.axWebBrowser component to work, but im open to any solution (note: im using C# in Visual Studio 2008)
If anyone can give me some info on how to get this going id really apreciate it
Sorry if this is not posted in the correct location but its my first post and this forum is HUGE!!



View the full article
 
Back
Top