0

I have a webview2 control in my WinForm and below code used to work and display the page perfectly but started to display empty page since last week. There was no change in the code at all.

webView1.CoreWebView2.Navigate("https://www.realestate.com.au/buy/in-4170/list-1");

Based on someones suggestion, I tried setting user agent before navigating and that does not help either

webView1.CoreWebView2.Settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36";
webView1.CoreWebView2.Navigate("https://www.realestate.com.au/buy/in-4170/list-1");
  • 1
    Cannot reproduce with the current *specifics*, the site responds correctly (WebView 2 `1.0.1901.177`) -- It appears not to respond well (or not at all) with an user-agent that suggests an older version of both iOS and Android (tested version 12 of both). Works without setting an user-agent, – Jimi Aug 06 '23 at 13:28
  • 1
    Nothing wrong with that page to be displayed. Edit your question and post the relevant code. How do you instantiate the `WebView2`. Maybe you are blocking the [navigation](https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/navigation-events) by mistake. We don't know about your current and last week codes. So, please elaborate. – dr.null Aug 06 '23 at 13:28
  • 1
    Many times a blank (ie: empty) page is the result of improper _CoreWebView2_ initialization. The following may be of interest: https://stackoverflow.com/a/73846538/10024425 - it's VB.NET, but the same principles apply. – Tu deschizi eu inchid Aug 06 '23 at 13:33

0 Answers0