MSXML: Access is denied - 80070005 - MSXML4.dll

Recently, I wanted to see if my ex in DC was reading my blog so I ran my referer log against an outdated copy of the MaxMind GeoIP locator database. I figured the database could use some updating so I ran the ImportMaxMindGeoIP.vbs script I posted awhile back, and much like in real life, I received an "Access Denied" error.

(Screenshot at the time showed a generic "Access Denied" dialog.)

Line 63 was basically a simple line that stated: objXMLHTTPindex.Send() Most of the access denied errors on the net referred to POSTing unencrypted data but the script was performing a GET. After about a half hour of troubleshooting, I realized that the URL my script was pointing to was returning an HTTP code of "301: Moved Permanently."

Once I plugged in the new updated URL, the script worked without a problem. So if you're receiving a similar error, be sure to check that the URL hasn't been moved. You can do this by using Sam Spade, Firefox Extensions or just loading up the URL in your browser and seeing if it's redirected to a new location.

As for knowing if the ex is reading my blog, the results were inconclusive. I guess I'll find out soon enough. I mean, I could just ask her, but what's the fun in that? ;)


Update (2025): MSXML 4.0 has been out of support for many years. If you still have VBScript or classic ASP using MSXML4, prefer MSXML6 or a modern HTTP client (for example, WinHTTP or PowerShell's Invoke-WebRequest/Invoke-RestMethod). Also note that HTTP 301/302 redirects are a common cause of these failures—if the server has moved, request the final URL or handle the Location header explicitly. A quick way to check for moves:

  • curl -I https://example.com/path to see 3xx and Location
  • PowerShell: Invoke-WebRequest -Uri https://example.com/path -MaximumRedirection 0 -ErrorAction SilentlyContinue