Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot load more than two IE instances
Message
 
À
04/12/2014 20:28:21
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01611875
Message ID:
01619150
Vues:
33
When you step through that code does the IE window go away when you release the first one? If it doesn't you have a problem with some sort of reference hanging. Try setting Visible=false before releasing the instance.

I think the issue might be that the object is not being disposed properly. So effectively an instance is still hanging around. Still this should not crash - it might just leak memory.

I do know that IE 10/11 cannot open unlimited numbers of windows and I've also found that IE loaded via COM does not fully unload everytime you load it. When I load IE and then unload it I see new instances in Task Manager for each instance i launched even though I explicitly released it.

So for bulk operations I would NOT recommend using multiple instances. You can reuse the instance however, and that should provide decent results. Unless you need asynchronous multithreaded instances (which isn't safe anyway with IE's process model) there's no reason to create new instances each time - just cache the single instance and re-use it.

+++ Rick ---

>This used to work for months and now I cannot load more than two IE instances.
>
>
>        Dim loInternetExplorer As Object = Nothing
>
>        loInternetExplorer = CreateObject("InternetExplorer.Application")
>        loInternetExplorer.Visible = True
>        loInternetExplorer.Navigate("http://www.domain.com")
>        apiShowWindow(loInternetExplorer.hwnd, SW_MAXIMIZE)
>        Do While (loInternetExplorer.Busy)
>            System.Threading.Thread.Sleep(100)
>        Loop
>
>        loInternetExplorer = Nothing
>
>        loInternetExplorer = CreateObject("InternetExplorer.Application")
>        loInternetExplorer.Visible = True
>        loInternetExplorer.Navigate("http://www.domain2.com")
>        apiShowWindow(loInternetExplorer.hwnd, SW_MAXIMIZE)
>        Do While (loInternetExplorer.Busy)
>            System.Threading.Thread.Sleep(100)
>        Loop
>
>        loInternetExplorer = Nothing
>
>        loInternetExplorer = CreateObject("InternetExplorer.Application")
>        loInternetExplorer.Visible = True
>        loInternetExplorer.Navigate("http://www.domain3.com")
>        apiShowWindow(loInternetExplorer.hwnd, SW_MAXIMIZE)
>        Do While (loInternetExplorer.Busy)
>            System.Threading.Thread.Sleep(100)
>        Loop
>
>        loInternetExplorer = Nothing
>
>
>I thought it was a memory issue. It is not. Even after a reboot, this is the same. This started to be like that weeks ago and never went ok after. It loads the first two. Then, on the third one, it gives an unhandled error about late binding.
>
>The only think I can see is a Windows update triggered something in regards to IE which I cannot use it like that anymore.
>
>I tried to put timeout between each. This did not change anything. I tried creating object for each instance. That did not change anything.
>
>Anyone would know what is wrong here?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform