xmlHTTP Post gets Error 53 response

When posting data to a web server, I get an Error 53 more often than not.  Problem is, I don't have a way to tell if the data was posted but the response was lost, or if the post itself never made it to the server.  Can anyone clarify with certainty just what this error tells me?  If the data did not make it, I want to try again...if it did, I really do not want duplicate entries, but how do I know?
The code I use is in vb.net 2010 and looks like this:

            xmlHTTP = New MSXML2.XMLHTTP
            xmlHTTP.open("POST", strURL, False)
            xmlHTTP.setRequestHeader("Content-Type", strContentType)
            orderForm.lblStatus.Text = "Checking Info >>>"
            System.Windows.Forms.Application.DoEvents()
            xmlHTTP.send(strPost)
            strResponse = xmlHTTP.responseText
DalexanAsked:
Who is Participating?
 
Dave BaldwinFixer of ProblemsCommented:
Apparently "using MSXML in .NET is not supported."   This page http://social.msdn.microsoft.com/forums/en-US/xmlandnetfx/thread/2712c1e5-a04b-42dd-b283-a8d18a49f731  has links to more info including the .NET functions that replace MSXML.
0
 
DalexanAuthor Commented:
This example states that MSXML is not supported in .net, then proceeds to use MSXML2 in the solution...I am already using MSXML2, not MSXML...

In my code (shown above) I get the Error 53 on the xmlHTTP.send(strPost) line.
0
 
DalexanAuthor Commented:
Here is the full code we are using to post transactions:

    Public Function SendAuthString(ByRef strURL As String, ByRef strPost As String, ByRef strContentType As String) As String
        On Error GoTo ErrorTrap
        Push("frmOrderPoint:SendAuthString(" & strURL & "," & strPost & "," & strContentType & ")")
        LogFileEntry(Peek(), 5)
        Dim iErr As Int16 = 0
        Dim xmlHTTP As MSXML2.XMLHTTP
        Dim strResponse As String = String.Empty
        Dim strAddHead As String = String.Empty
        Dim aURL() As String

        If strContentType = "xCharge" Then
               'commented out section
        ElseIf strContentType = "Base64" Then
            aURL = Split(strURL, "|")
            xmlHTTP = New MSXML2.XMLHTTP
            xmlHTTP.open("POST", aURL(0), False)
            xmlHTTP.setRequestHeader("Authorization", "Basic " & EncodeBase64(aURL(1) & ":" & aURL(2)))
            orderForm.lblStatus.Text = "Checking Info >>>"
            System.Windows.Forms.Application.DoEvents()
            xmlHTTP.send(strPost)
            strResponse = xmlHTTP.responseText
            xmlHTTP = Nothing
        Else
            If strContentType = "" Then
                strContentType = "application/x-www-form-urlencoded"
            End If
            xmlHTTP = New MSXML2.XMLHTTP
            xmlHTTP.open("POST", strURL, False)
            xmlHTTP.setRequestHeader("Content-Type", strContentType)
            orderForm.lblStatus.Text = "Checking Info >>>"
            System.Windows.Forms.Application.DoEvents()
            xmlHTTP.send(strPost)
            strResponse = xmlHTTP.responseText
            xmlHTTP = Nothing
        End If
        SendAuthString = strResponse
ExitFunc:
        Pop()
        Exit Function
ErrorTrap:
        iErr += 1
        If Err.Number = 53 Then
            If iErr < 3 Then
                Pause(2)
                Resume
            End If
        End If
        GStr_f_end_method = Peek()
        GLng_f_end_number = Err.Number
        GStr_f_end_desc = Err.Description
        ErrHandler_OP(frmOrderPoint)
        SendAuthString = ""
        Resume ExitFunc
    End Function
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
CtrlAltDlCommented:
Is strPost are any special characters parsed or escaped is that variable?  Does a single-quote in that variable screw it up?
0
 
DalexanAuthor Commented:
No special characters or single quotes in that variable.
0
 
leakim971PluritechnicianCommented:
Did you try GET instead POST?
0
 
DalexanAuthor Commented:
Instead of troubleshooting this issue we decided to change our code to use the .dll instead of passing the parameters to the customers webservice. We will go forward under the assumption that not supporting msxml is a step in the wrong direction for our application and will pursue a more open source alternative.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.