Home CefSharp ChromiumWebBrowser.Load fails on some URLs
Reply: 0

CefSharp ChromiumWebBrowser.Load fails on some URLs

user1736 Published in July 22, 2018, 5:56 pm

I've built an WinForms app that uses the CefSharp package to render sites using Chrome. It works perfect, almost. When I ask it to navigate to one of our internal URLs, it doesn't navigate at all. I can send it to any other site I wish, internal or external to our network. I've tried using the URI class to reformat the URL string, using HTML code in a site to redirect to the desired URL, using a hyperlink on a site to link to the URL, doing HTTP or HTTPS, and ending the URL with and without a backslash.

All the googling in the world says this should not be happening using the most recent version of CefSharp. I've ruled out the issue being the browser not being initialized, as I can navigate to other sites, and it fails 100% of the time I try to navigate to the desired URL. I've ran out of ideas. I can load the site using Firefox or Chrome outside of the application without an issue, and I can use IE but with compatibility mode disabled (ruling out the webbrowser control in .NET).

I'm looking for a way to "force" the browser to navigate to the URL.

public void changeUrl(string url)
                Uri address = new Uri(url);
                url = address.AbsoluteUri;
            }catch (Exception e)
            Control ctrl = getBrowser();
            if(ctrl is WebBrowser)
                WebBrowser ie = (WebBrowser)ctrl;
                ChromiumWebBrowser chrome = (ChromiumWebBrowser)ctrl;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.3124 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO