Msxml3.dll error '80090326' The message received was unexpected or heavily formatted

URL = "https://github.com/index.html"
Set xHttp = CreateObject("MSXML2.ServerXMLHTTP")
xHttp.Open "GET", URL, False
xHttp.setOption 2, 13056
xHttp.Send()

      

can anyone tell why this code works on windows7 and doesn't work on Windows XP

Mistake

msxml3.dll error '80090326' `
The message received was unexpected or badly formatted.`

      

on xHttp.Send

+3


source to share


3 answers


I recently ran into a similar problem trying to fetch a file over https to a Windows 2003 server. It turned out that the SSL / TLS cipher suite supported on the client side was so old that none of them were supported on the server.



In my case, the server was behind AWB ELB, which was doing https negotiations. I was able to reconfigure ELB to use the old cipher suite (in the Listeners tab, change the encryption configuration to use ELBSecurityPolicy-2015-05) and the client-side script magically started working.

+1


source


We had to install the following KB on a Windows 2003 server:

https://support.microsoft.com/en-us/kb/948963

After that, another error:

Msxml3.dll error '80072f7d'



An error occurred in the support of the secure channel

Thanks to this message ( Server giving msxml3.dll error "80072f7d" when trying to access a secure url ) installed http://support.microsoft.com/kb/938397 and worked.

When working on production, only the first KB solved the problem.

+1


source


If you changed MSXML2.ServerXMLHTTP to MSXML2.XMLHTTP or Microsoft.XMLHTTP , does this work or not for you?

Try this code and let us know if you get the same errors or not (tested on Windows 7 only)

On Error Resume Next
 Set File = WScript.CreateObject("MSXML2.XMLHTTP")
 File.Open "GET", "https://github.com/index.html", False
 'This is IE 8 headers
 File.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C; .NET4.0E; BCD2000; BCD2000)"
 File.Send
 If err.number <> 0 then 
    line =""
    Line  = Line &  vbcrlf & "" 
    Line  = Line &  vbcrlf & "Error getting file" 
    Line  = Line &  vbcrlf & "==================" 
    Line  = Line &  vbcrlf & "" 
    Line  = Line &  vbcrlf & "Error " & err.number & "(0x" & hex(err.number) & ") " & err.description 
    Line  = Line &  vbcrlf & "Source " & err.source 
    Line  = Line &  vbcrlf & "" 
    Line  = Line &  vbcrlf & "HTTP Error " & File.Status & " " & File.StatusText
    Line  = Line &  vbcrlf &  File.getAllResponseHeaders
    wscript.echo Line
    Err.clear
    wscript.quit
 End If

On Error Goto 0

 Set BS = CreateObject("ADODB.Stream")
 Set ws = CreateObject("wscript.Shell")
 BS.type = 1
 BS.open
 BS.Write File.ResponseBody
 BS.SaveToFile "Location.html", 2
 ws.run "Location.html"

      

0


source







All Articles