Access denied error with MSXML2.ServerXMLHTTP

流过昼夜 提交于 2020-12-29 07:54:12

问题


I'm receiving an intermittent "msxml3.dll error '80070005' Access is denied." error. The object always posts back to the same domain. I don't quite know why it works sometimes and why it fails other times. This is Classic ASP - VBScript

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") 
xmlhttp.open "POST", "http://xxxx.com/GetCacheValue.aspx", false
xmlhttp.send "" 
strCaptchaText = xmlhttp.responseText 
set xmlhttp = nothing

回答1:


Here's something I snipped from a Google search result:

Security tightened when posting data using the ServerXmlHttp object

Security in the implementation of the MSXML 4.0 SP2 ServerXmlHttp object has been enhanced to check the Internet Explorer security policy setting for submitting non-encrypted form data.

A security policy setting of "Disable" or "Prompt" for the "Submit nonencrypted form data" option will result in an "Access Denied" error message when attempting to post form data using the ServerXmlHttp object.

This is a change that can potentially break existing code that uses earlier versions of the ServerXmlHttp object (such as prior released versions of both MSXML 3.0 and MSXML 4.0) to post form data when the Internet Explorer security policy setting for submitting non-encrypted form data is not enabled.




回答2:


Changing you first line to this should help, it did for me:

set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP.6.0") 


来源:https://stackoverflow.com/questions/3086214/access-denied-error-with-msxml2-serverxmlhttp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!