Write xml file in ASP with MSXML object

Discussion in 'ASP General' started by Ray, May 31, 2004.

  1. Ray

    Ray Guest

    Hi, al
    I cannot write a xml file with the following cod
    dim objXm
    Set objXML = Server.CreateObject("Microsoft.XMLDOM"
    objXML.async = Fals
    objXML.load server.mappath("../online.xml"
    If objXML.parseError.errorCode <> 0 The
    response.write "parse online.xml error(" & xsl & ")
    response.en
    End I

    dim rootNod
    Set rootNode = objXML.documentElemen

    ... ...

    -> objXML.Save server.mappath("../online.xml"
    I don't know what's wrong in the code, when I open this page, IE prompts me

    Error Type
    msxml3.dll (0x80070005
    Access is denied. (in -> line

    Someone can help me? It is urgent!
     
    Ray, May 31, 2004
    #1
    1. Advertising

  2. Ray wrote:


    > I cannot write a xml file with the following code
    > dim objXml
    > Set objXML = Server.CreateObject("Microsoft.XMLDOM")
    > objXML.async = False
    > objXML.load server.mappath("../online.xml")
    > If objXML.parseError.errorCode <> 0 Then
    > response.write "parse online.xml error(" & xsl & ")"
    > response.end
    > End If
    >
    > dim rootNode
    > Set rootNode = objXML.documentElement
    >
    > ... ....
    >
    > -> objXML.Save server.mappath("../online.xml")
    > I don't know what's wrong in the code, when I open this page, IE prompts me
    > "
    > Error Type:
    > msxml3.dll (0x80070005)
    > Access is denied. (in -> line)
    > "


    It is a security issue, ASP pages are run under a special account that
    obviously needs write permission if you want to save some XML to a file.
    Make sure the account IUSR_ComputerName has the necessary permissions.
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, May 31, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. KathyB
    Replies:
    0
    Views:
    1,044
    KathyB
    Jun 25, 2003
  2. William F. Robertson, Jr.
    Replies:
    1
    Views:
    993
    Kathy Burke
    Jun 25, 2003
  3. Andy Norman
    Replies:
    1
    Views:
    641
    Oleg Tkachenko
    Nov 23, 2003
  4. Edward

    File Sytem Object versus MSXML

    Edward, Jan 16, 2007, in forum: ASP General
    Replies:
    6
    Views:
    157
    Mike Brind
    Jan 17, 2007
  5. Anthony Jones
    Replies:
    6
    Views:
    298
    Anthony Jones
    Aug 13, 2008
Loading...

Share This Page