Re: Is it possible to add an event handler for SHDocVw.WebBrowser or use AxSHDocVw.WebBroswer without a form in a Windows service?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:umCbykL2HHA.1484@xxxxxxxxxxxxxxxxxxxxxxx
"David" <davidd31415@xxxxxxxxxxx> schrieb:
I would like to use a AxSHDocVw.WebBroswer control in a Windows service-
is this possible without creating a form? I added the reference I usually
use to add this object in a Windows Application but only SHDocVw appears
under References in the Solution Explorer.


I wonder why you would want to use a visual control in a service which
doesn't provide a user interface.

* What exactly do you want to archieve?
* Which version of .NET are you using?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


I'm writing a service that will connect to a website on a regular basis,
retrieve information, and then update external devices- this works fine as
an application but I would rather not use task scheduler to run it and a
service sounds like the best method for this. I started out using
HttpWebRequest but was not successful logging into the website with it-
axWebBrowser worked nicely.

I tried using the common component WebBrowser instead of the ActiveX one but
ran into problems accessing the DOM. I tried creating a HTMLDocument
variable and setting it equal to WebBrowser.Document but encountered a
"specified cast is not valid" error. Using the debugger to look at the
WebBrowser.Document property lead me to a "cannot obtain value" message- the
WebBrowser had loaded a webpage so I'm stuck there with that one, and stuck
with the event handler on SHDocVw.WebBrowser.



.



Relevant Pages

  • Re: Supremes "Buy It Now" in eBays favor
    ... It's a reference to an old Joel Chandler ... to not only getting stuck on something, ... Every war when it comes, or before it comes, is represented not as a war ...
    (alt.marketing.online.ebay)
  • Re: Windjammer Reportedly Cancels Nov. 3 "Restart" Cruise
    ... their Website is at http://www.star-clippers.com. ... websites as a reference can hardly be considered advertising. ... John Sisker, SHITO-SHORE CRUISE AGENCY® ... newsgroup then I suggest you can either: ...
    (rec.travel.cruises)
  • Re: Supremes "Buy It Now" in eBays favor
    ... It's a reference to an old Joel Chandler ... to not only getting stuck on something, ... The Uncle Remus story - fable with a moral, if you will - is at ...
    (alt.marketing.online.ebay)
  • Re: Sharing compiled web assemblies between developers?
    ... and set a reference in their own working solution. ... I am not familiar with a specific Solution Items folder. ... The website I am developing has a large DLL that includes custom ... All of this was done on my main dev machine, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Supremes "Buy It Now" in eBays favor
    ... It's a reference to an old Joel Chandler ... to not only getting stuck on something, ... The Uncle Remus story - fable with a moral, if you will - is at ...
    (alt.marketing.online.ebay)