473,473 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multithreaded Automating of IE

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
May 24 '06 #1
2 1272
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?

--

________________________
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
-------------------------------------------------------

"Alan Pretre" <no@spam> wrote in message
news:uR****************@TK2MSFTNGP04.phx.gbl...
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

May 24 '06 #2
"Alvin Bruney" <www.lulu.com/owc> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
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
May 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: pradyumna | last post by:
In Project settins - C/C++ - Code Generation, what is the difference between the option "Multithreaded" and "Multithreaded DLL". I understand that on selecting multithreaded option, single and...
7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
2
by: pradyumna | last post by:
In Project settins - C/C++ - Code Generation, what is the difference between the option "Multithreaded" and "Multithreaded DLL". I understand that on selecting multithreaded option, single and...
2
by: Alan Pretre | last post by:
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.