title: MSXML in VB.NET
body: <p>This code works well in good old VB6.  I have tried all kinds of ways to do this in VB.NET but can't get it to work.  Can anyone help me with code that works in .NET please?</p>
  
  <pre><code>Dim objHTTP As New MSXML2.XMLHTTP
  
  Dim strReturn As String
  Dim objReturn As New MSXML2.DOMDocument
  
  
  Dim url As String
  Dim XMLEnvelope As String
  
  
  url = "http://zzzzzdummy.com"
  
  XMLEnvelope = vbNull
  
  
  
  objHTTP.open("post", url, False, "", "")  '
  
  Debug.Print(Err.Number)
  
  objHTTP.setRequestHeader("Content-Type", "text/xml")
  objHTTP.setRequestHeader("Content-length", Len(XMLEnvelope))
  Debug.Print("------------Send Envelope-------------")
  Debug.Print(XMLEnvelope)
  Debug.Print("--------------------------------------")
  objHTTP.send(XMLEnvelope)
  
  strReturn = objHTTP.responseText
  objReturn.loadXML(strReturn)
  Debug.Print("----------Response Envelope-----------")
  Debug.Print(strReturn)
  Debug.Print("--------------------------------------")
  </code></pre>