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

'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

I'm getting the following error when debugging. Can someone shed some light?

- I'm running it x86.
- It opens up IE, and Navigates to the URL, but does not fill in the form details.
- It highlights the
Expand|Select|Wrap|Line Numbers
  1. Do Until IE.ReadyState = 4





Thanks,



An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll

Additional information: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))


Expand|Select|Wrap|Line Numbers
  1. Public Class Form1
  2.     Dim IE As Object
  3.  
  4.     Dim SMPLogin As String = "Username"
  5.     Dim SMPPass As String = "Password"
  6.     Dim SMPURL As String = "http://mydomain.com/Login.srq"
  7.  
  8.     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  9.  
  10.         IE = CreateObject("InternetExplorer.Application")
  11.         IE.Visible = True
  12.         IE.Navigate2(SMPURL)
  13.  
  14.         ' Wait for IE to open the URL
  15.         Do Until IE.ReadyState = 4
  16.         Loop
  17.  
  18.         ' Input form fields.
  19.         IE.Document.GetElementById("username").SetAttribute("value", SMPLogin)
  20.         IE.Document.GetElementById("password").SetAttribute("value", SMPPass)
  21.         IE.Documnet.GetElementById("submit").InvokeMember("click")
  22.     End Sub
  23. End Class
  24.  
Dec 9 '15 #1
1 3385
madankarmukta
308 256MB
Can you please try this... IE.BUSY unless the page loads.

Regards.
Dec 12 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Carsten | last post by:
Hi, I have a problem with instantiating a Web service. When the constructor for the proxy is called a SEHException is thrown. The call stack is shown below: ...
1
by: umeshatpromact | last post by:
Hello!, I got following exception when using COM component for EXCEL object in ASP .Net. I have added reference of "Microsoft.Office.Interop.Excel.dll" I deployed an application on local...
1
by: sasikumarks | last post by:
Hi, Im using the following code to retrieve the user details from the AD server. But when i execute the code,it throws me the error. Please help me in this...
3
by: bharathreddy | last post by:
Hi, Why do we get System.Runtime.InteropServices.COMException. Simple terms exception is thrown when an unrecognized HRESULT is returned from a COM method call. Apart from this is there any...
0
by: anand1206 | last post by:
hi , i am very new to .net world. I wrote a code using c# ,which trys to access the emails from exchange server public folder i am getting the below exception: ...
1
by: wagugwe | last post by:
Dear all, Am faced with the above problem. I am designing an application in VB.Net 2003 and using Ms Access 2000 as the database. I have the following code: Private Sub cmdSave_Click(ByVal...
2
by: sriregu | last post by:
Hi, i am trying the exe file in .net environment and am getting the following error.Any idea how i can resolve it? System.Runtime.InteropServices.COMException (0x80040154): Class not registered ...
0
by: =?Utf-8?B?VGhvbWFzIFR1dGtv?= | last post by:
An ASP.NET web project has recently began crashing WebDev.WebServer.exe with a System.Runtime.InteropServices.SEHException. The EventLog for the crash looks like this: Application ID:...
0
by: =?Utf-8?B?am1hZ2FyYW0=?= | last post by:
I have a Windows service written in C# that is configured to automatically start. Sometimes - maybe 20% of the time - the service fails to start due to an exception in WMI code. I haven't made my...
10
by: Parvati | last post by:
Hi all, I am migrating an hosted application to another Server,hosting is done while generating MS documents and downloading buttons are clicked then getting error like...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.