Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


OLE IDispatch exception code 0 from MSXML3.dll

OLE IDispatch exception code 0 from MSXML3.dll

OLE IDispatch exception code 0 from MSXML3.dll


until recently I was able to download images from a web site using code like this:

loHttpRequest = CreateObject( "MSXML2.ServerXMLHTTP" )
loHttpRequest.Open( "GET", lcImageAddress, .F. )
loHttpRequest.Send( )
STRTOFILE( loHttpRequest.ResponseBody, lcImageFileName )

Suddenly, while working within the same session, an "OLE IDispatch exception code 0: the connection with the server was terminated abnormally" appeared, and since then I have not been able to make it work again.
The error may change to "... code 0: Access is denied" or "... code 0: Unspecified error" if I try to use a different syntax in CreateObject.

I am using VFP9 SP2 and Firefox on Windows 7 Professional, and step into the same error with a different web browser (specifically as VFP calls the Send method). The images are easily displayed on the browser at their URL address.
At first I thought the msxml3.dll file got corrupted, but using msxml6.dll does not solve the problem.

I suspect it has to do with security certificates, though I have no clue how to proceed.


RE: OLE IDispatch exception code 0 from MSXML3.dll

The whole topic of root certificates may not play a role here, just authentication tokens your browser(s) have, but not MSXML2.ServerXMLHTTP. As that's an OLE class dedicated to use of a server that makes HTTP requests to third party services, it isn't involved and embedded into whole area of settings and session cookies a brower has.

As you say you don't get happy with MSXML6, what did you use, what OS do you work on?


   oXMLHttpRequest = CreateObject("MSXML2.XMLHTTP.6.0")
   lcVersion = "6"
   oXMLHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0")
   lcVersion = "3"
? lcVersion 
oXMLHttpRequest.open("GET","https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png", .f.)
Do While oXMLHttpRequest.readyState<>4
STRTOFILE(oXMLHttpRequest.ResponseBody, PUTFILE("","google.png","png")) 

Bye, Olaf.

Olaf Doschke Software Engineering

RE: OLE IDispatch exception code 0 from MSXML3.dll

OK, I could confirm my own suspicion.

When I'm logged off from Gmail, for example, requesting the inbox returns an OLE error "Access denied."
oXMLHttpRequest.Open("GET","https://mail.google.com/mail/u/0", .F.)

Not logged in to other sites I simply get a redirection and the response body becomes the login page you're redirected to. So it all depends on how the site handles the authentication, it can choose to return an HTTP response header 403 FORBIDDEN, that causes that "Access denied" OLE error.

The MS XML classes are embedded into all the settings, cookies, etc. the Internet Explorer knows, not any other browser, even if you make another browser your standard. I know, because I did. All the MS classes only have access to the MS realm of internet-specific things, not where and how Chrome or Firefox knows your sites long term session cookies that automatically log you in. So no matter whether you use msxml3 or 6, the ServerXMLHTtp class or the "normal" XMLHTTP class, a site will only let you get a resource when you're logged in, some sites cause an error, others a redirection.

It's nothing wrong about the DLLs, nor is your certificate store corrupt.

I don't know the detail of your URLs. When you request images, that are public, that shouldn't be an issue- The simplest thing to try is visiting the site with IE and when necessary, log in. Then try to request what you want to access with VFP code.

And last not least, be very strict with your URL. It does make a difference if you request https:// vs http://, some sites may respond with forbidden status to any http:// requests, most of the internet today runs on https://.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: OLE IDispatch exception code 0 from MSXML3.dll

Many thanks for your reply, Olaf.

I am on Windows 7, and the image URLs are from an online stamp catalogue (e.g. https://i.colnect.net/o/153/157/Int-Year-for-the-C...). Logging in to the website doesn't make any difference as for image downloading, and I can still display any image with http:// either.

As I said earlier, the problem arised at once while I was using my VFP application, so I doubt there was any change in security issues at that very moment. Nor was I changing my code or anything that could impact such behaviour.

RE: OLE IDispatch exception code 0 from MSXML3.dll

If you use Windows Server 2012, Windows 7 Service Pack 1 (SP1), and Windows Server 2008 R2 SP1. you should update to latest service pack to connect to sites using TLS 1.1 or TLS 1.2.

You can also add TLS 1.1 & TLS 1.2 support using this quick fix ( must be using windows 7 sp1 at least ):


Marco Plaza

RE: OLE IDispatch exception code 0 from MSXML3.dll

Quote (vfp4ever)

I doubt there was any change in security issues at that very moment.

A sudden behaviour change will not be caused randomly, but by, well, a sudden change of anything. Marco is likely on the right track that any upgrade in the site about the SSL had an impact, or a Windows update. Is Win7 out of support phase by now?

Yes, it is: https://www.laptopmag.com/articles/windows-7-end-o...

That's how such base libraries involved in establishing SSL tunnels don't get updated anymore. But sites update theirs.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: OLE IDispatch exception code 0 from MSXML3.dll

And about trying http;//, it turns out i.colnect.net is redirecting such requests to https://, so you can't choose "I waive for a secure connection to you, hand me over that picture without establishing a secure tunnel."

It also seems to me, then, the whole mechanism of establishing an SSL connection is simpler, more bound to one choice of TLS, than what the IE itself supports. And Firefox is known to even not use the cryptographic libraries of Windows.

The way SSL connections are established starts with a handshake procedure that negotiates what TLS version to use.

Here's a bug report mentioning update MS14-066: https://serverfault.com/questions/741706/bug-with-...

The simplest way out would be updating to Win10, though.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: OLE IDispatch exception code 0 from MSXML3.dll

If I open my web browser's (Firefox) configuration page, under security.tls.version.max, I can see that it's already set to 4, which should mean that TLS 1.1 and 1.2 are installed and working. Yet I have installed the Quick Fix Marco has suggested, and installed all the recommended Windows updates (apart from Silverlight and .NET 4.8) that I left behind. Unfortunately the error is still showing.

RE: OLE IDispatch exception code 0 from MSXML3.dll

You don't get the latest Updates of Microsofts cryptographic libraries, as said, Win7 is out of support.

And fine, Firefox has it's own libraries, Firefox doesn't use Windows foundations and IE doesn't use Firefoxes foundations.

The easiest way to fix your problem will be a Windows upgrade to Windows 10.

Bye, Olaf.

Olaf Doschke Software Engineering

RE: OLE IDispatch exception code 0 from MSXML3.dll

Please forgive me if I got it wrong. Olaf, are you saying that the MSXML3.dll (as well as MSXML6.dll) are giving me errors because of some obscure library that Windows 7 has not updated since last month (and is not going to update until the end of scheduled support later in January)? And I should update to Windows 10 to get it fixed back? I assume you have tried the above code and it works fine on your system.

Well, my knowledge of networking and internet services is very limited, yet I thought that those instructions that let me download an image file were very basic. Is there any other way to do it under Windows 7?

RE: OLE IDispatch exception code 0 from MSXML3.dll

It's the only conclusion I have. But indeed the end of extended support is still not yet, it's January 2020.

So, of course, the possibility is, it only is a thing on your Win7 based computer, then others may help you find out, but I'll not go back to Win7 to see what's wrong.

You could use tools like Fiddler to maybe find out more about where requests to the pictures fail, you may step on your own foot outside of your system in a hardware firewall of your router, for example. But it's quite clear you have a problem establishing the connection to the server.

I'm pretty sure though when you make the move to Win 10 - and it's pretty close to the deadline 2020 - you revive your system in that aspect and solve two concerns at once. Of course, you would check first, whether your system can run Win 10, I couldn't reuse a TPM module, but that was a minor issue.

Bye, Olaf.

Olaf Doschke Software Engineering

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close