I am using .NET WPF WebBrowser control in our application to launch the whole react application in web browser control. But when I run the WPF application It shows me the dialog box with javascript error and if you press yes-yes to all the questions then also It ended up showing nothing on the screen but the blank screen
This is my code
public MainWindow()
{
InitializeComponent();
webBrowser1.Navigate("http://localhost:3000/");
}
Where my react application is running on port 3000(Checked everything and running properly)
This is the dialog box shown when I run the application
Second error for "2.aeaacf2c.chunk.js" file
Third error for "main.a60e0400.chunk.js " file
When I press "yes" for all , It ended up showing blank screen with no loaded JS
WPF's legacy WebBrowser
control uses Internet Explorer which is pretty much a dead product. It will not display a React page better than IE, which is to say, badly or not at all.
Please take a look at WebView2 or better yet CEFSharp. (FYI I have no affiliation with either product). Either will suit your needs but I like CEFSharp better as it doesn't require the end user to install any dependencies. This is a big gotcha with WebView2.