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

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

P: 1
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
Share this Question
Share on Google+
1 Reply


100+
P: 293
Can you please try this... IE.BUSY unless the page loads.

Regards.
Dec 12 '15 #2

Post your reply

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