Results 1 to 8 of 8

Thread: MSXML2.ServerXMLHTTP.6.0

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    4

    Post MSXML2.ServerXMLHTTP.6.0

    Hello Experts,

    Good day, everyone.

    I have an application written in VB.NET 2010 to pull orders online thru web service. The method used in my application to pull data is CreateObject("MSXML2.ServerXMLHTTP.6.0") so it could return a xml data. I used this method for more than a year and it works fine. But yesterday, we encountered an problem on using this method. I don't know what exactly the issue is, the application return an error "The connection with the server was terminated abnormally." I tried to debug the code and validated the process and found, it fail on the send function. I checked my API credential supposing that there is something wrong about it but there is none.

    The other web service works fine. It just this specific method of consuming a web service has an issue. I don't know what is the conflict with it. One thing that makes me freak out when isolating the issue. It works on my Windows 8.1 but it does not work on WinXp, Win7 and 2008 R2 operating systems.

    Here's my code:
    Code:
    Private sub getOrder()
    
                Dim strOrderURL As String = String.Format(SiteURL & "/api/v2/orders/{0}", strOrderId)
                Dim xmlHttp As Object
                xmlHttp = CreateObject("MSXML2.ServerXMLHTTP.6.0")
                xmlHttp.Open("GET", strOrderURL, UID, PWD)
                xmlHttp.setRequestHeader("Content-Type", "application/xml")
                xmlHttp.setRequestHeader("Accept-Chartset", "utf-8")
                xmlHttp.setRequestHeader("Accept-Language", "un-US")
                xmlHttp.setRequestHeader("Authorization", "Basic " & Base64Encode(UID & ":" & PWD))
    
                xmlHttp.send() 'THIS IS WHERE IT FAIL AND WON'T GO THRU.
    
                Dim xmlOrder As New Xml.XmlDocument
                Dim xmlShipAddress As New Xml.XmlDocument
                xmlOrder.LoadXml(xmlHttp.responsexml.documentelement.xml)
    
    End sub
    
        Public Function Base64Encode(ByVal sText)
            Dim oXML, oNode
            oXML = CreateObject("Msxml2.DOMDocument.3.0")
            oNode = oXML.CreateElement("base64")
            oNode.dataType = "bin.base64"
            oNode.nodeTypedValue = Stream_StringToBinary(sText)
            Base64Encode = oNode.text
            oNode = Nothing
            oXML = Nothing
        End Function
    Hoping that you could help me out resolving this issue. Thanks in advance!
    Last edited by Shaggy Hiker; Feb 13th, 2018 at 09:16 AM. Reason: Added CODE tags

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: MSXML2.ServerXMLHTTP.6.0

    Welcome to the forum. I edited your post to include [CODE][/CODE] tags to format the code a bit nicer. You can do this by pressing the # button and pasting code between the resulting tags.

    Do you control both ends of this transaction? If you are also the author of the service, then you have more knowledge of this. If you do not, then the most likely answer is that the service changed in some way.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    4

    Re: MSXML2.ServerXMLHTTP.6.0

    Hi Shaggy Hiker, thanks for helping me to properly format my post.

    Actually, I just control the windows application side. Just consuming their web service. It's kinda weird. The other day it works fine on all windows OS.
    Just yesterday up to now it won't work on WinXP, Win7 and 2008 R2. But it work on Win 8.1.

    It started the issue last Friday afternoon, but it was fixed when restarted the server.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: MSXML2.ServerXMLHTTP.6.0

    Well, you control the windows application side, but is it your organization that wrote the service (and hosts it, as it sounds like), or is it a third party.

    Frankly, if this happened to me, the first thing I'd do is walk down the hall to a certain office and ask, "what did you do this time?" But that's because, for services we host, I know who is likely responsible for changing a setting that broke things. That may not be the answer in your case, it's just that a look on Google for that error message suggests that the most likely culprit is a change in the server, the firewall the server sits behind, or something like that. That would also account for the sudden change.
    My usual boring signature: Nothing

  5. #5
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: MSXML2.ServerXMLHTTP.6.0

    Why are you using a COM object instead of one of the .NET objects for sending HTTP data? Perhaps some Windows Update changed how this object behaves.

    This is also notable because very recently, the rules for HTTPS changed and some older encryption methods are not allowed anymore. Older versions of Windows do not support the newer cryptography and, being older, did not receive updates to use it. I know for sure Windows XP has no support, but I'm not sure if MS relented and patched Win7.

    I also know that older versions of the .NET Framework don't automatically support it either, and VS 2010 is right on the borderline where it may or may not support it depending on the installed patches.

    So if you're using HTTPS at all, that could be the culprit: something in your encryption stack is no longer current with modern security standards.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

  6. #6

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    4

    Re: MSXML2.ServerXMLHTTP.6.0

    Hi Shaggy Hiker,

    I did ask Microsoft and the 3rd party web service provider. But Microsoft did not give a solution instead, they give me to an URL where you can report a case. 3rd party told also that they can't give support about the issue.

  7. #7

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    4

    Re: MSXML2.ServerXMLHTTP.6.0

    Quote Originally Posted by Sitten Spynne View Post
    Why are you using a COM object instead of one of the .NET objects for sending HTTP data? Perhaps some Windows Update changed how this object behaves.

    This is also notable because very recently, the rules for HTTPS changed and some older encryption methods are not allowed anymore. Older versions of Windows do not support the newer cryptography and, being older, did not receive updates to use it. I know for sure Windows XP has no support, but I'm not sure if MS relented and patched Win7.

    I also know that older versions of the .NET Framework don't automatically support it either, and VS 2010 is right on the borderline where it may or may not support it depending on the installed patches.

    So if you're using HTTPS at all, that could be the culprit: something in your encryption stack is no longer current with modern security standards.
    Hi Sitten Spynne,

    Thanks for your response.

    So you're saying these methods and the COM are no longer supported anymore. Why is it working on Windows 8.1?

    Can you give me an alternative solution for this issue?

    Thanks

  8. #8
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    Re: MSXML2.ServerXMLHTTP.6.0

    That's not really what I said. You have to try and figure out what's going on. Here's what I know:

    If you want to make an HTTPS connection at this point in time, you can't use anything with TLS 1.0 or 1.1. These versions were supported for a very long time. TLS 1.2 is more secure and is the new accepted standard. Practically everyone switched to it because that's what the money people switched to.

    MSXMLwhatever has to use whatever crypto stack is on the Windows it's installed on. So if you use it on, say, Windows 8.1 and Windows 8.1 has support for TLS 1.2, it's going to work. But on Windows XP, if MS hasn't released some kind of TLS 1.2 support (or you haven't installed it), that type can't use TLS 1.2 because it's not there.

    If that's the real problem, switching to a different type won't really help, because the problem is "your OS doesn't support the right crypto".

    I had a similar problem in our Android code. Android has supported TLS 1.2 for a long time, but it's only in recent versions that it's the default. To get TLS 1.2 on earlier versions of Android you're supposed to do a little dance and ask for it. But the network component we used didn't do that dance, so I had to find a different one that did. And for Android devices older than a certain version there's no TLS 1.2 support at all, so we had to stop supporting those.

    I don't know if this is your problem, but it's certainly something I'd check given the symptoms "it worked fine in the last few months, but now it only works on newer Windows versions".

    If it is indeed this issue, you need to figure out how/if you can patch your Windows to support TLS 1.2. It might not be possible, depending on the version of Windows.
    This answer is wrong. You should be using TableAdapter and Dictionaries instead.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width