Issue with GetSourceAsync() #4279
Replies: 5 comments 3 replies
-
In an older build of Cef I have a similar issue. I get only the outer tags: I have no issues with any build when I'm using my IP and not a proxy. |
Beta Was this translation helpful? Give feedback.
-
I fixed this the other day by using the following code, before calling GetSourceAsync():
Now I have a new problem with proxies that will connect through the cefclient.exe test build command line proxy switch, but NOT the RequestContext.SetPreference method, Cef.GetGlobalRequestContext.SetProxy method, RequestContext.Configure().WithProxyServer(proxy, port).Create() method OR settings.CefCommandLineArgs.Add("proxy-server", proxy) method. I thought the error might have to do with the fixed_servers mode, however using a pac_url doesn't seem to work either. Honestly I don't need to use these particular proxies, but I am curious as to why they work with the cefclient test build but won't work with the WinForms Cef assembly. |
Beta Was this translation helpful? Give feedback.
-
I'm quite sure that I've set up the code correctly. All the aforementioned methods were tested independently from each other. I can switch the proxy from one list (the list that I got working the other day) to the other and the first will work and the other will not. Does cefclient dynamically run through different methods of connecting to the proxy until it has a connection? I set debug log to Verbose and cefclient, WinForms working proxy and WinForms failed proxy all show the exact same output. The proxy seems to connect but the page doesn't load. The cefclient test build I'm using matches the latest WinForm version. |
Beta Was this translation helpful? Give feedback.
-
I have one more piece of information. If I type the proxy address in the address bar in a browser, there seems to be a redirect prior to connection with the one that fails. Here's the server response for the proxy that fails: Here's a typical response from a proxy that works:
|
Beta Was this translation helpful? Give feedback.
-
I just solved it. I had to implement a RequestHandler class and leave the username & password as empty strings. Very strange but it worked. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using WinForms Cef (latest build). I'm connecting via SSL proxy, which seems to load the page fine, however I can't retrieve the page source with GetSourceAsync() or ViewSource() (empty string and empty txt in notepad respectively).
Here's my code:
Beta Was this translation helpful? Give feedback.
All reactions