Freigeben über


msxml3.dll: Access is denied. msxml4.dll: Access is denied.

The following vb Script can fail with an "Access is denied" error message:

Dim aRequest
Set aRequest = CreateObject ("Microsoft.XMLHTTP")
aRequest.Open "POST","https://www.contoso.com/PostAccepter.aspx",False
aRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
aRequest.Send "this is data"
Wscript.Echo aRequest.responseText

If you use Fiddler (https://fiddler2.com) you will see a comple of redirects to Microsoft.com.  That is the reason for this failure in my case.  By clearing the flag in Internet Explorer for that internet zone that prevents this POST (Access data sources across domains), I am able to run again.

1. In Internet Explorer, click Internet Options on the Tools menu.
2. On the Security tab, click Trusted sites, and then click Sites.
3. Add your site to the zone.
4. Click Custom Level.
5. Under Miscellaneous/Access data sources across domains, click Enable.

 

see https://msdn.microsoft.com/en-us/library/cc507438(VS.85).aspx (security model)

also see https://support.microsoft.com/?id=820882

Comments

  • Anonymous
    February 26, 2008
    I did that , but still getting the same error while loading XML doc thru Javascript, Any Help?

  • Anonymous
    July 07, 2008
    msxml permission denied errors accompanied by 500 Internal Server Errors can also be caused by a lack of write permissions on the server for the user that the xml dll is running as for the file/folder being written to.

  • Anonymous
    July 22, 2008
    This article helps you understand the underlying security model: http://msdn.microsoft.com/en-us/library/cc507438(VS.85).aspx

  • Anonymous
    September 30, 2008
    I use this script in Visual Basic 2008, but I can't stop the "Access is Denied" message. Any ideas?

  • Anonymous
    October 01, 2008
    Just what has already been posted...  You can try posting the question to some of the public aliases on MSDN or open a support case for further assistance.

  • Anonymous
    October 14, 2009
    Thank you very much, this fixed my problem!

  • Anonymous
    October 14, 2009
    Glad it helped!  Thanks for dropping me a note.

  • Anonymous
    February 18, 2010
    regardless of the zone of the site or the IE security settings, I would still get that error. I found that the URL was incorrect.  Once corrected, that message disappeared.

  • Anonymous
    February 18, 2010
    jbetz, That may be because the server itself was sending that message.  If you attempt to access a resource that does not exist you might get that message.  Thanks for sharing.

  • Anonymous
    September 05, 2011
    Its not working for me,any alternative.

  • Anonymous
    September 05, 2011
    You can try several things:

  1.  Cut and past the URL from your script into IE and make sure it works
  2.  Run Procmon and see what is generating the Access Denied message (compare a successful URL from your script like in the example).
  3.  If you still need help you can get assistance from support.microsoft.com/oas