Re: mshtml and windows services

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

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 10/15/04


Date: Fri, 15 Oct 2004 15:24:18 -0400

Robert,

    Using the Web Browser object in a service requires interaction with the
desktop. In general, this is a bad idea.

    If you are just looking to submit information to websites, then you
might want to use the HttpWebRequest and HttpWebResponse classes instead.
They don't require interaction with the desktop.

    Hope this helps.

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Robert May" <rakkerspamisevil91@hotmail.com> wrote in message 
news:%238dlPiusEHA.3564@tk2msftngp13.phx.gbl...
>I have an application that uses the Ax web browser object. When I call the 
>IHTMLElement.click() method on an input button (<input type="submit"> or 
><input type="button">), the click fires appropriately, if I'm running it 
>from a windows forms based application.
>
> However, when I run the EXACT same code under a windows service, either as 
> a logged in user or as the local system account, the click fails to 
> process. Clicking on other elements (like <a>) works.
>
> I've tried submitting the form directly, in cases where a submit occurs, 
> but can't do that either.  Both GET and POST actions fail.
>
> What am I doing wrong?  Is there something that prohibits the onclick 
> event from firing for buttons when running as a service?  Am I missing 
> something?
>
> Robert
> 


Relevant Pages

  • Re: mshtml and windows services
    ... might want to use the HttpWebRequest and HttpWebResponse classes instead. ... Nicholas Paldino ... > However, when I run the EXACT same code under a windows service, either as ... Both GET and POST actions fail. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: mshtml and windows services
    ... might want to use the HttpWebRequest and HttpWebResponse classes instead. ... Nicholas Paldino ... > However, when I run the EXACT same code under a windows service, either as ... Both GET and POST actions fail. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • http request from windows service
    ... What security issues shall I care about when sending http requests from a ... I have a console program that works fine if I start it from ... I am using HttpWebRequest and HttpWebResponse classes. ...
    (microsoft.public.dotnet.security)
  • Re: http request from windows service
    ... Are receiving a particular exception? ... I am using HttpWebRequest and HttpWebResponse classes. ...
    (microsoft.public.dotnet.security)