By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,666 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

mshtml and windows services

P: n/a
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
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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]
- mv*@spam.guard.caspershouse.com

"Robert May" <ra****************@hotmail.com> wrote in message
news:%2****************@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

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.