473,396 Members | 1,676 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,396 software developers and data experts.

mshtml and windows services

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
1 1676
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Erich Hofacker | last post by:
Hello, I have written an application in .NET (C#) which uses some stuff from the Microsoft.mshtml. Unfortunately some customers reported that they are missing this DLL. Therefore we now...
3
by: Zürcher See | last post by:
I've wrote an application that use internet explorer to download some html page, to get the document I use the Microsoft.mshtml library. mshtml.IHTMLDocument3...
10
by: Sunny | last post by:
Hi all, dev. env.: VS.Net2003/C# I have a windows form application with web browser control. I need to capture the onsubmit event of the forms in the document in order to get the values and log...
7
by: Robert May | last post by:
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...
10
by: Hans Merkl | last post by:
Hi, I have written an pap with .NET 2.0 and c# that uses MSHTML. It works fine on my development machine but on machines I deploy it to I get the following exception when ever I call MSHTML. ...
2
by: DotNetShadow | last post by:
Hi Guys, I have been reading heaps of information in regards to MSHTML object being used in .NET applications, windows and UI-less. I have read the walkall samples and tried various techniques...
3
by: DotNetShadow | last post by:
Hi Guys, I have been reading heaps of information in regards to MSHTML object being used in .NET applications, windows and UI-less. I have read the walkall samples and tried various techniques...
0
by: Filippo Bettinaglio | last post by:
VS2005, C# I have developed a UserControl embedded in a HTML web page. And I can access to the DOM with the following code: HTML page: …….. <BODY onload=loadDoc()> …….
0
by: nickin4u | last post by:
I have a application that is used to automate certain task, I have been using mshtml.HTMLDocument class but certain events like click a button do not fire. I have tried a number of combinations but...
0
by: Nariban Barkan | last post by:
Hi All, In my c# project, i use Microsoft.MSHTML.Dll as reference. It works perfectly fine on the development machine, but on the release machines that are in production use we gets error when...
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:
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.