Search code examples
c#winformswebbrowser-control

WebBrowser does not navigation to Uri


I have a WebBrowser control in WinForm. I am trying to navigate to a web page (for example http://google.com).

webBrowser1.AllowNavigation = true;
webBrowser1.Navigate(new Uri("http://google.com"));

But when when I run it, I see this error: Navigation to the webpage was canceled

I did this before without any problems.

I tried to disable Internet Security and Firewall, still not working!


Solution

  • In this case, I just Reset Internet Explorer settings from Internet Options (Advanced Tab) and it worked.