I am using a VB.NET program that uses the WebBrowser control to navigate the Web. The site that I need to navigate to suddenly became not IE-friendly. So, I am thinking to try to make it look to the site that the WebBrowser control is not IE, but a Mozilla Firefox browser. How can I do that? Can I change an HTTPrequest header that the control sends? Or something like that? Thank you!
------------- Edit --------------
Hi, xxbbcc! Thanks for your big answer. HttpWebRequest is about the only option that I have left. I used to work with that in the past, but I doubt it will work in the case of a site that I need.
The problem is - the site uses a LOT of scripting to build the web page, and the button that has to be clicked is actually a link that evokes a script and then the page is built even further. That final HTML code is what I need.
Now the problem is even more complicated than I thought. It absolutely does not matter what user-agent is specified in the request headers (I found it out with the Fiddler, thanks to jfmags). What seems to matter is that after the site redirects the browser to an HTTPS address, Firefox keeps sending HTTP/1.1 requests, while IE starts sending HTTP/1.0 requests, and that is how it probably fails. This is made by design by site owners. I found a discussion on the Net about this here http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/how-to-force-ie-to-use-http11-over-ssl-through/360eca2d-e290-4078-ad37-7665bec706c4 , but it does not seem conclusive. I used to work with the Mozilla ActiveX Control but it is obsolete now, since the project was discontinued.
The site that I am talking about is this notorious site.
I know, I am a pirate, it is bad. By downloading a film I probably cause a multimillion dollar loss to some huge and incredibly rich companies. But where I live, it is just impossible to buy a film with original sound, they are all crippled by dubbing. So, what options do I have left? I like films.
I will try to see if the HttpWebRequest can pull this off.