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","",False
aRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
aRequest.Send "this is data"
Wscript.Echo aRequest.responseText

If you use Fiddler ( you will see a comple of redirects to  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 (security model)

also see


Comments (11)
  1. I did that , but still getting the same error while loading XML doc thru Javascript, Any Help?

  2. wrossmann says:

    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.

  3. Jeff Sanders says:

    This article helps you understand the underlying security model:

  4. jake33 says:

    I use this script in Visual Basic 2008, but I can’t stop the "Access is Denied" message. Any ideas?

  5. Jeff Sanders says:

    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.

  6. tintin says:

    Thank you very much, this fixed my problem!

  7. Jeff Sanders says:

    Glad it helped!  Thanks for dropping me a note.

  8. jbetz says:

    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.

  9. Jeff Sanders says:


    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.

  10. Srinivas says:

    Its not working for me,any alternative.

  11. Jeff Sanders says:

    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

Comments are closed.

Skip to main content