Write xml file in ASP with MSXML object

R

Ray

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!
 
M

Martin Honnen

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top