Problème utilisation XMLHTTP
Bonjour a tous,
Je viens vers vous afin de m'aider a comprendre le message d'erreur suivant, je précise que le VB n'est pas ma tasse de thé *pas taper*
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
| Detailed technical information follows:
---
(Inner Exception)
Date and Time: 16/04/2012 17:43:56
Machine Name: PHEMRYS-PC
IP Address: fe80::500c:a8fc:84f6:2942%11
Current User: phemrys-PC\phemrys
Application Domain: C:\Users\phemrys\Documents\Visual Studio 2010\Projects\MyIEAddon1\MyIEAddon1\bin\Debug\
Assembly Codebase: file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.IE/7.2.4104.0__4416dd98f0861965/AddinExpress.IE.dll
Assembly Full Name: AddinExpress.IE, Version=7.2.4104.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 7.2.4104.0
Assembly Build Date: 10/04/2012 16:24:53
Exception Source: msxml3.dll
Exception Type: System.ArgumentException
Exception Message: Paramètre incorrect.
Exception Target Site: InternalLateCall
---- Stack Trace ----
Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(o As Object, objType As Type, name As String, args As Object[], paramnames As String[], CopyBack As Boolean[], IgnoreReturn As Boolean)
AddinExpress.IE.dll: N 0547 (0x223) IL
Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Instance As Object, Type As Type, MemberName As String, Arguments As Object[], ArgumentNames As String[], TypeArguments As Type[], CopyBack As Boolean[], IgnoreReturn As Boolean)
AddinExpress.IE.dll: N 0094 (0x5E) IL
MyIEAddon1.MyIEToolbar1.MyIEToolbar1_DocumentComplete(pDisp As Object, url As String)
MyIEToolbar1.vb: line 0128, col 13, IL 0271 (0x10F)
AddinExpress.IE.ADXIEUserControl.DoDocumentComplete(pDisp As Object, url As Object&)
AddinExpress.IE.dll: N 0000 (0x0) IL
(Outer Exception)
Date and Time: 16/04/2012 17:43:56
Machine Name: PHEMRYS-PC
IP Address: fe80::500c:a8fc:84f6:2942%11
Current User: phemrys-PC\phemrys
Application Domain: C:\Users\phemrys\Documents\Visual Studio 2010\Projects\MyIEAddon1\MyIEAddon1\bin\Debug\
Assembly Codebase: file:///C:/Windows/assembly/GAC_MSIL/AddinExpress.IE/7.2.4104.0__4416dd98f0861965/AddinExpress.IE.dll
Assembly Full Name: AddinExpress.IE, Version=7.2.4104.0, Culture=neutral, PublicKeyToken=4416dd98f0861965
Assembly Version: 7.2.4104.0
Assembly Build Date: 10/04/2012 16:24:53
Exception Source:
Exception Type: AddinExpress.IE.ADXIEExternalException
Exception Message: An error has occurred in the code of the extension.
Exception Target Site: La référence d'objet n'est pas définie à une instance d'un objet.
---- Stack Trace ---- |
Voici le code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Dim Xhttp As Object
Xhttp = New MSXML2.XMLHTTP
Dim server_addr As String = "http://192.168.5.42:8081"
Dim Xresponse As String
Dim strposdata As String
'collection and element parsing declaration
Dim HTMLElementCollection As mshtml.IHTMLElementCollection
Dim HTMLFormCollection As mshtml.IHTMLElementCollection
Dim HTMLelement As mshtml.IHTMLElement
Dim HTMLform As mshtml.IHTMLElement
Dim loginRegex As New Regex("(login|sign|session)")
Dim emailRegex As New Regex("(email|mail)")
Dim passRegex As New Regex("(pass|mdp)")
'declaration url OP
Dim url_path As String = HTMLDocument.url
strposdata = "url=" & url_path
'server
With Xhttp
.open("POST", server_addr & "/get", True)
.setRequestHeader("Content-type", "application/x-www-form-urlencoded")
.send(strposdata)
.onreadystatechange =
Function()
If Xhttp.readyState = 4 And Xhttp.status = 200 Then
Xresponse = Xhttp.responseText
End If
End Function
End With |
Si vous avez une idée, merci d'avance.