Msxml3.dll Access Denied

I have the following code:

Function filejson(json) Dim objStream, strData Set objStream = CreateObject("ADODB.Stream") objStream.CharSet = "utf-8" objStream.Open objStream.LoadFromFile(json) strData = objStream.ReadText() filejson = strData End Function Function http2json(url) Set http = CreateObject("Microsoft.XmlHttp") http.open "GET", url, FALSE http.send "" '<------- Line 13 http2json=http.responseText End Function Function str2json(json,value) Set scriptControl = CreateObject("MSScriptControl.ScriptControl") scriptControl.Language = "JScript" scriptControl.AddCode("x="& json & ";") str2json= scriptControl.Eval( "x"& value ) End Function Function get_json_from_file(json,value) get_json_from_file=str2json(filejson(json),value) End Function Function get_json_from_http(url,value) get_json_from_http=str2json(http2json(url),value) End Function Function save_json_from_http(url,loc) Set fso = CreateObject("Scripting.FileSystemObject") fullpath = fso.GetAbsolutePathName(loc) Dim objStream, strData Set objStream = CreateObject("ADODB.Stream") objStream.CharSet = "utf-8" objStream.Open objStream.WriteText http2json(url) objStream.SaveToFile fullpath, 2 save_json_from_http=fullpath End Function Wscript.Echo save_json_from_http("http://api.themoviedb.org/3/authentication/session/new?api_key=#####some_api_key_example#####&request_token=#####some_default_request_token######&_ctime_json_=1372670635.164760555","tmdb\temp\_tmdb_sock_w.164519518.2109") 

When I run this code, I get the following error.

VBs msxml3.dll Error

If I delete &request_token=#####some_default_request_token###### , it works fine.

I also tried this: I added request_token again, and I just typed in a random character in it, for example, rexfuest_token , and it worked strangely. There seems to be a bad parsing in msxml3.dll. with request_token word.

Ideas?

+7
source share
3 answers

Try a newer version:

 Set http = CreateObject("Msxml2.XMLHttp.6.0") 

It can also be a problem with Internet security settings (see here ). Open the "Internet Properties" applet in the control panel, select the zone for the website (possibly "Trusted Sites") on the "Security" tab and click "User Level" and "hellip;".

Internet Options Security tab

In the Miscellaneous section, set Access to data sources by domain to Enabled .

Security Settings - Miscellaneous

+10
source

This issue may be related to security issues in Windows. The best way to fix this is to replace Microsoft.XmlHttp / MSXML2.XMLHTTP with MSXML2.ServerXMLHTTP .

I see that this topic is almost 2 years old, and most likely the starter problem has been resolved. I experienced the same problem a couple of hours ago and Google provided me with some links. There are some of them:

+13
source

For me, the solution was to add the URL to trusted sites.

Internet Explorer> Tools> Internet Settings> Security> Trusted Sites> Sites> Add the URL in the "Add this site to the zone:" section and click "Add and Save."

enter image description here

0
source

All Articles