1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Server object error 'ASP 0177 : 800401f3' ; Msxml2.DOMDocument.4.0

Discussion in 'C#' started by italianbakery, Mar 9, 2011.

  1. #1
    I'm not too familiar with asp but I was told by dydacomp to host a asp file to push data from yahoo to our local machine. The local machine is not secure so I figured a cheap way would be to get a webhost and add ssl. Buttt

    I'm getting an error on shared windows host;
    http://projecta.w05.winhost.com/yahoo/Order.asp

    I know if I was running windows server in house I would not have a problem, but I have no idea how to install Msxml2.DOMDocument.4.0.
    SEMrush
    Does anyone know any host that will run this file successfully.

    I found that 1and1 host in the uk uses Microsoft.XMLHTTP and MSXML2.XMLHTTP, but I'm not sure if that will even work. Or I can just edit the file to make it work.

    Any help appreciated. thanks

    the full code can be seen here;

    
    <%@ Language="VBSCRIPT" %>
    
    <%
    	
    Dim ByteCount, BinRead
    
    ByteCount = Request.TotalBytes
    BinRead = Request.BinaryRead(ByteCount)
    tmptxt = SimpleBinaryToString(BinRead)
    
    Set oXml = Server.CreateObject("Msxml2.DOMDocument.4.0")
    Set oXml2 = Server.CreateObject("Msxml2.DOMDocument.4.0")
    oXml.async = false
    oXml.validateOnParse = false
    oXml.resolveExternals = false
    oXml.preserveWhiteSpace = true
    oXml2.async = false
    oXml2.validateOnParse = false
    oXml2.resolveExternals = false
    oXml2.preserveWhiteSpace = true
    
    ' Get order number
    oXml.LoadXML(tmptxt)
    
    Set oStore = oXml.selectSingleNode("/OrderList").getAttributeNode("StoreAccountName")
    Set oOrder = oXml.selectSingleNode("//Order")
    Set oOrderID = oOrder.getAttributeNode("id")
    
    oXml2.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" ?><OrderList></OrderList>")
    Set oOrderList = oXml2.selectSingleNode("/OrderList")
    Set oStore2 = oXml2.createAttribute("StoreAccountName")
    oStore2.text = oStore.text
    oOrderList.attributes.SetNamedItem(oStore2)
    oOrderList.appendChild(oOrder)
    
    StrFileName = oOrderID.text+".xml"
    
    oXml2.save(Server.MapPath(StrFileName))
    'Create xml file with order id as file name  
    'StrPhysicalPath = Server.MapPath(StrFileName)
    'set objFileName = CreateObject("Scripting.FileSystemObject")	
    'set objFileNameTS = objFileName.CreateTextFile(StrPhysicalPath)
    'objFileNameTS.Writeline tmptxt
    'objFileNameTS.Close
    'set objFileName = nothing
    'set objFileNameTS = nothing
    
    oXml.LoadXML("<?xml version=""1.0"" encoding=""UTF-8"" ?><LastOrder></LastOrder>")
    Set oLastOrder = oXml.selectSingleNode("/LastOrder")
    oLastOrder.text = oOrderID.text
    oXml.save(Server.MapPath(oStore.text+"-"+"LastOrder.xml"))
    
    Set oXml = nothing
    Set oXml2 = nothing
    Set oStore = nothing
    Set oOrder = nothing
    Set oOrderID = nothing
    Set oOrderList = nothing
    Set oStore2 = nothing
    Set oLastOrder = nothing
    	
    Function SimpleBinaryToString(Binary)
      'SimpleBinaryToString converts binary data (VT_UI1 | VT_ARRAY Or MultiByte string)
      'to a string (BSTR) using MultiByte VBS functions
      Dim I, S
      For I = 1 To LenB(Binary)
    	S = S & Chr(AscB(MidB(Binary, I, 1)))
      Next
    
      SimpleBinaryToString = S
    End Function
    
    
    %>
    Code (markup):
     
    italianbakery, Mar 9, 2011 IP
    SEMrush
  2. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,681
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not sure why you are using classic ASP in this day and age. If your creating something new then your 99% of the time better off going for asp.Net if your wanting to use the microsoft stack.

    What is it you are actually wanting to achieve?
     
    AstarothSolutions, Mar 10, 2011 IP
  3. italianbakery

    italianbakery Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Im not, the code was sent to me from dydacomp ( a backend ecommerce management solution)

    they are stuck in the 90's, but the code supposedly works for others, i just cant seem to get it to work.

    I made no adjustments to the code.

    Would like to know if its even possible to run this code successfully.
     
    italianbakery, Mar 10, 2011 IP
  4. miguelf

    miguelf Member

    Messages:
    98
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    48
    #4
    MSXML 4.0 may not be installed. If it is maybe a 32-bit/64-bit issue the AppPool would have to be x86. You could also try to create the object "Msxml2.DOMDocument.2.0" instead of "Msxml2.DOMDocument.4.0" by changing the appropriate string in the above code.
     
    miguelf, Apr 7, 2011 IP