title: How to upgrade VBScript application that uses Msxml2.ServerXMLHTTP.3.0 to C#?
body: <p>I was recently tasked with upgrading a classic ASP web application to C#.  Everything has been fine, except that there is some code that uses <code>Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")</code>.  I really don't even know what this is, except I have the general idea that it is being used to call a web service over HTTPS somehow.</p>
  
  <p>The code looks like this:</p>
  
  <pre><code>    Dim strSOAPEnvelope
  
      strSOAPEnvelope = "&lt;?xml version='1.0' encoding='utf-8'?&gt;" &amp; _
                          "&lt;soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'&gt;" &amp; _
                              "&lt;soap:Body&gt;..........&lt;/soap:Body&gt;" &amp; _
                          "&lt;/soap:Envelope&gt;"                  
  
    oXMLHttp.Open "POST", "https://example.com/service.asmx", False
    oXMLHttp.setRequestHeader "Content-Type", "text/xml"
    oXMLHttp.setOption 2, 13056
    oXMLHttp.setRequestHeader "Connection", "close"
    oXMLHttp.setRequestHeader "SOAPAction", "https://example.com" &amp; strfunction
  </code></pre>
  
  <p>I think that I understand the general notion that this is communicating with a web service via HTTPS.  How do I go about upgrading this code to C#</p>