Link to home
Start Free TrialLog in
Avatar of ErikIce
ErikIce

asked on

WebBrowser control freeze main application

Hello Experts,
I have a big problem.

My winform application (VB.NET 2008) using WebBrowser control for show remote  aspx pages.
During develop and testing, application worked well,  but when I went in production I discovered a trouble.
When application open webpages not responsive (some time wait more of 60 secs) entire application remain hang until the asp page is loaded.
This behavior has  created a disappoint in my customer and I have to fix it in hurry.

I tryed to create a usercontrol, using webbrowser control inside to a thread but  without results.

Anybody can help me?
Any suggestion is really appreciated.
Thanks

ErikIce
 

Avatar of Alfred A.
Alfred A.
Flag of Australia image

Hi,

When you access the web pages, does the web pages retrieve or manipulate a database such as SQL Server?

It is possible that when you developed and tested it, it is accessing local resources, and that is why it was fast.
Avatar of ErikIce
ErikIce

ASKER

Hi Alfreed1,
ASP web page calling remote web service and wait for their answer before to complete the page load.
Remote web services, some time answer slow and some time are quick, but in any case I can't manage them because they are remoting and out of my competence.
Hi,

OK. So, it is a web service access then.  Are you accessing the web service asynchronously?  I suspect you are accessing it synchronously and that is why it is locking up your threads.  You application is waiting for a response from the web service.  Can you switch to asynchronous if this is possible?  What kind of web service are you accessing?  Does it have a WSDL or are you accessing it directly through a SOAP client?
Hi,

Also, what is the level of concurrency (parallel hits) happening to this web service provider?  Is there any other win form application accessing this web service?
Avatar of ErikIce

ASKER

Hi,
I don't know what really happen behind my call, I know only that I have an URL to call, waiting and receive back some data. Remote web service is developed in Delphi I believe.
My problem is that my application isn't responsive when .NET webbroser control waiting for remote answer.
If I'm able to run webbrowser control in a separate thread the problem could be fixed.
Avatar of ErikIce

ASKER

I try many samples but webbrowser doesn't work if used it in other threads.
Somebody has other ideas?
Thanks
Hi,

Have you tried doing an Application.DoEvents() in your code?

Check this out:

http://msdn.microsoft.com/en-us/library/system.windows.forms.application.doevents.aspx
Avatar of ErikIce

ASKER

Thank you Alfred1 for your support,

Yes I tried it, and I noticed that the application freeze exactly when the doevents is fired.
I believe that webbrowser control has a problem.
I tried to navigate on the aspx pages using IE8, Firefox and Crome,  and I discovered that Firefox and Chrome working well and they are responsive, on the contrary IE8 freeze all browser application.

Really I haven't idea on how turnaround it.


ASKER CERTIFIED SOLUTION
Avatar of Alfred A.
Alfred A.
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ErikIce

ASKER

Thank you Alfred1 for your suggestions,
I tested in IE6 and IE7 but also with these webbrowser control freeze and there isn't difference on memory usage.

I tried using webrequest statement instead of webbrowser control and the application is responsive, now the problem is how merge webrquest answer into webbrowser control. I saw that when I load the datastream received from webquest in webbrowser control I lost all refernce of images and objects.

At the end I believe that there isn't a solution of this behaviour using MS WebBrowser.

Thak you for your help.
Erik
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial