Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / May 2006

Tip: Looking for answers? Try searching our database.

Multithreaded Automating of IE

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Pretre - 24 May 2006 05:35 GMT
I have a .NET windows service that automates IE through interop to shdocvw.
Everything works great as long as I only try to do one task at a time.
However, this is a multithreaded service where each thread wants to go to
different websites to do some work, and I find that my multiple instances of
shdocvw.InternetExplorer step over each other.  So I conclude that there
really is only one instance of IE under the hood that they are
unintentionally sharing.

If I write a test application in WinForms and open multiple copies of it,
the IE instances are kept separated as I would expect.  Unfortunately, I
need this same kind of isolation in a windows service.  I have tried
creating new appdomains for each instance and instantiating with
CreateComInstanceFrom(), but that doesn't help.

Basically, what I need is multiprocess-like isolation within a single
process and separate appdomains are not cutting it.  Any ideas?

TIA.

-- Alan
Alvin Bruney - 24 May 2006 14:00 GMT
I'd imagine you could get multi-tasking if you used the webrequest method
assuming you don't need to *see the results in a browser? Is that a
requirement?

Signature

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

>I have a .NET windows service that automates IE through interop to shdocvw.
>Everything works great as long as I only try to do one task at a time.
[quoted text clipped - 16 lines]
>
> -- Alan
Alan Pretre - 24 May 2006 15:00 GMT
> I'd imagine you could get multi-tasking if you used the webrequest method
> assuming you don't need to *see the results in a browser? Is that a
> requirement?

The pages are complex with arrays of hyperlinks, buttons, and whatnot that
need to navigated, values filled in for querying, etc.  IE seemed at the
time the easiest way to accomplish this.  And is in fact easy except for
that multithreading problem.

-- Alan

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.