I am using Visual Studio Community (.Net 4.5). I have a simple form containing only a webBrowser control. When the form loads, I try to load a web page in the webBrowser control. This works when I load the page with Chrome. But it doesn't when I try with the webBrowser control. It says "Our website no longer supports out of date browsers". So I read many articles here and I tried to send a header in my query, defining my user agent to be the same as I get when I read it using javascript in Chrome. It Still doesn't work. Does anyone have a simple solution? I'm still new at all this. Here is my code. Thanks, you people are great!
private void Form1_Load(object sender, EventArgs e)
{
string website = "http://cpaquebec.ca/en/find-a-cpa/";
webBrowser1.ScriptErrorsSuppressed = true;
//webBrowser1.Navigate(website); //doesn't work
string headers = "";
headers += "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36\r\n";
webBrowser1.Navigate(website,"_self",null,headers); //still won't work
}