473,385 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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

1
by: Elbert Lev | last post by:
I started with Python two weeks ago and already saved some time and efforts while writing 2 programs: 1. database extraction and backup tool, which runs once a month and creates a snapshot of...
6
by: Charles Banas | last post by:
weird subject - i hope more than just one curious regular will hear me out. :) ok, i've got a bit of a big problem, and i need answers as soon as possible. i know this forum is meant for web...
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...
6
by: Dan Kelley | last post by:
We have a multithreaded app that responds to events, and writes these events to a text file. This text file is used by an external system for further processing. We want to be able to write...
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...
3
by: groups | last post by:
Hi all, I've recently ported a rather large C application to run multithreaded. A few functions have seriously deteriorated in performance, in particular when accessing a rather large global...
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...
3
by: | last post by:
Is it possible to have just a multithreaded sub procedure? What I need is a timer time_elapsed event (2 sec interval) send params to a sub that is multithreaded. I have a COM component used to...
3
by: Jake K | last post by:
I have a multithreaded application that I now want to convert into a Windows Service. Does application.run work in a windows service? Are there things to take into consideration when creating a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.