What is the .NET replacement for ServerXMLHTTP, MSXML2?

Posted on 2005-04-26
Last Modified: 2008-01-09
I am trying to use a vendor web service.  They sent me sample code that looks like the following:

 Dim oXmlhttp As XMLHTTP30
 Dim sResponse As String
 Set oXmlhttp = New ServerXMLHTTP
 oXmlhttp.setOption(2) = 13056
 oXmlhttp.Open "POST","", False, "UserID", "Password"
 oXmlhttp.setRequestHeader "Content-Type", "text/xml"
 oXmlhttp.send oXMLDom.Xml

How do I do the equivalent in .NET?
Question by:rfischernw7
    LVL 12

    Expert Comment

    You don't need a replacement here.

    You need to add a reference to the com or assembly dll which contains the definition and implementation of
    XMLHTTP30 and ServerXMLHTTP in your project, then you can use the same code.
    LVL 12

    Accepted Solution

    Here is what you need to do:

    In .net, choose menu Project->Add Reference,
    then browse to directory c:/windows/system32, double click on msxml3.dll and click OK.

    Now you can call Set oXmlhttp = New MSXML2.ServerXMLHTTP
    Or you add Imports MSXML2 at the top of the code then you can call just Set oXmlhttp = New ServerXMLHTTP

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now