473,803 Members | 3,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mshtml and windows services

I have an application that uses the Ax web browser object. When I call the
IHTMLElement.cl ick() 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 1693
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.co m

"Robert May" <ra************ ****@hotmail.co m> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
I have an application that uses the Ax web browser object. When I call the
IHTMLElement.c lick() 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
413
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 redistribute a copy of the Microsoft.mshtml-DLL with our installation routine (just copy it into the application directory). Now the application works on most machines, but on a couple of machines I get a "BadImageFormatException" (details below). What...
3
11336
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 Document=(mshtml.IHTMLDocument3)this.WebBrowser.Document; This program work fine under windows xp, but under windows 2000 i gives me the following error: File or assembly name Microsoft.mshtml, or one of its dependencies, was not
10
8026
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 them. I have tried this: 1.
7
4674
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 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...
10
11002
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. "Could not load file or assembly 'Microsoft.mshtml, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified."
2
3760
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 with MSHTML. My biggest problem seems to be running MSHTML in asp.net application and looping elements in the document. Example:
3
2762
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 with MSHTML. My biggest problem seems to be running MSHTML in asp.net application and looping elements in the document. Example:
0
1967
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
1881
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 in vain. I was now trying to use System.Windows.Forms.Htmldocument class; here is the code Dim do1 As System.Windows.Forms.HtmlDocument = web1.Document web1 is axwebbrowser however when i execute the above line i get the error cannot...
0
1591
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 user try to load a windows form that uses this reference. the error message is: ****************** System.Reflection.TargetInvocationException: Exception has been thrown by
0
9700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9564
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10292
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.