Dan
Dan

Reputation: 2028

WebBrowser Control causes whole application to become unresponsive

I have a C# .NET 3.5 application with an embedded web browser. The browser is designed to point to remote sites (Rather than anything local). Everything works fine, but when the page is slow to respond this causes my entire application to become unresponsive until the page is loaded.

I don't mind the browser being unresponsive while it does its thing, but the application going too is far from ideal.

Is there a good way to prevent this? Would it be beneficial to run the WebBrowser on a seperate thread - that's a bit beyond my skillset right now and I don't think the WebBrowser control really likes multithreading? But I can learn if needs be.

Upvotes: 5

Views: 3685

Answers (3)

shine
shine

Reputation: 1

this happened only on win7;I use fiddler2 to Monitor HTTP/HTTPs traffic .I find embedded web browser to visit this web:http://ctldl.windowsupdate.com/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab?50ff94e72ac1a75c;the solution is follow:http://support.microsoft.com/kb/2730040/en (Method 2 or Method 3).you can try it.other u can use .net framework4.0,then u haven't this problem.

Upvotes: 0

Dan
Dan

Reputation: 2028

As it happens I found that the root cause of this was my application running as administrator. Exactly the same issue was seen when using Internet Explorer - as such, I've simply rewritten the bits that required admin privileges so I'm now no longer seeing the original issue.

Upvotes: 0

Jf Beaulac
Jf Beaulac

Reputation: 5246

See the answer #2 on this question for a solution on how to run it on a separate thread: BackgroundWorker and WebBrowser Control

You might as well read answer #1 too, it explain the behaviors you are seeing (WebBrowser control blocking UI thead).

Upvotes: 2

Related Questions