msimmons
msimmons

Reputation: 166

Microsoft.XMLDOM msxml3.dll error '80070005' Access is denied. (The code worked yesterday, I think installing ASP.NET AJAX 1.0 broke it?)

I have some legacy asp classic code that typically runs fine so I haven't replaced it yet (it is on my long to do list though), it runs on a schedule as part of a larger system, parsing XML files.

Today it is throwing an error...

msxml3.dll error '80070005'

Access is denied.

/inc/inc_parsexml.asp, line 77

Line 77 is:

    objXML.Load (Server.MapPath(strFilePath))

which is part of this larger snippit:

Set objXML = Server.CreateObject("Microsoft.XMLDOM")
            Set objList = Server.CreateObject("Microsoft.XMLDOM")
            objXML.async = False
            objXML.Load (Server.MapPath(strFilePath))
            If objXML.parseError.errorCode <> 0 Then
                'do something here
                session("LogMSG") = "XML parse error: " & objXML.parseError.errorCode & " on file " & strFilePath & "<br>" & Session("ErrMSG")
            End If
            Set objList = objXML.getElementsByTagName("*")
            reDim strNodeParentName(objList.length -1)
            For intCount = 0 To (objList.length -1)     
                strNodeParentName(intNodeParentCount) = objList.item(intCount).nodeName
                If objList.item(intCount).hasChildNodes Then
                        buildNodeNameVar()
                        writeNode()
                    If objList.item(intCount).firstChild.nodeName = "#text" Then
                        If intCount <> (objList.length -1) Then
                            checkParent()
                        End If
                    Else
                        intNodeParentCount = intNodeParentCount +1
                    End If
                Else
                    buildNodeNameVar()
                    writeNode()
                    If intCount <> (objList.length -1) Then
                        checkParent()
                    End If      
                End If
            Next

To the best of my knowledge it was running fine yesterday, however I did install ASP.NET AJAX 1.0 ( http://www.microsoft.com/en-us/download/details.aspx?id=883 ) on the server (for a different project in asp.net 2.0) so maybe I stepped on some toes?

I hope it is something simple, please help, thanks!

EDIT: Thanks to John, it turned out to be that the IUSER account did not have access to the file it was trying to read...

Upvotes: 1

Views: 10958

Answers (2)

bvdb
bvdb

Reputation: 24750

I just experienced the same issue. After a lot of searching and trying, it just turned out that I was trying to save a file that was still marked as "read-only".

This solved the issue for me.

Upvotes: 1

John
John

Reputation: 4638

"Access is denied" suggests that your website's IUSR account is denied access to msxml3.dll. You need to find this file and check permissions.

Assuming that you're not running a really old version of IIS, you should have the current version of the file - msxml6.dll - for which you would use Server.CreateObject("Msxml2.DomDocument.6.0") You may find that that the correct permissions are already in place for this version and you aren't denied access

Edit

While I got there in the comments, this answer was wrong. I should have read the question more carefully. If the IUSR account really didn't have access to the dll then the script would fall over three lines earlier at Server.CreateObject

Upvotes: 2

Related Questions