|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Sudden automation error with MS XML objectI have an application that uses the MS XML object to grab info from a custom-written ASP. This has been working fine for some time, but has suddenly given problems. I have had several customers who use the program report errors, all over the last couple of days. Eventually I narrowed the problem down to the creation of the XML object itself. I have written a tiny test program that performs just this part, which is shown below. To reproduce the program, start VB, add a reference to the MS XML parser version 3.0, add a text box and paste in the code below. Set the text box to be multiline with both scrollbars. When you run the code, you should see ... Creating olXML Created OK which is exactly what I, and some other people see. Several of my clients get ... Creating olXML Error number -2147221231 Description Automation error instead, which seems to mean that the XML object can't be created. As I said, these same people have been using the application without problem until the last few days. I can't understand how several independent people can simultaneously have the same problem. I had one of them download the XML object from the MS web site and reinstall it to see if that helped, but it didn't. Any ideas? I'm completely baffled. TIA VB code to reproduce (or not) the problem ================================ Option Explicit Private Sub Form_Load() Dim olXML As MSXML2.ServerXMLHTTP On Error GoTo ErrorHandle Text1.Text = "Creating olXML" & vbCrLf & vbCrLf Set olXML = New MSXML2.ServerXMLHTTP Text1.Text = Text1.Text & "Created OK" & vbCrLf & vbCrLf Exit Sub ErrorHandle: Text1.Text = Text1.Text & "Error number " & Err.Number & vbCrLf & vbCrLf Text1.Text = Text1.Text & "Description " & Err.Description & vbCrLf & vbCrLf End Sub Private Sub Form_Resize() Text1.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight End Sub -- Alan Silver (anything added below this line is nothing to do with me)
Show quote
Hide quote
"Alan Silver" <alan-silver@nospam.thanx> wrote Have you tried using late binding?> > I have an application that uses the MS XML object to grab info from a > custom-written ASP. This has been working fine for some time, but has > suddenly given problems. I have had several customers who use the > program report errors, all over the last couple of days. <...> > Eventually I narrowed the problem down to the creation of the XML object > itself. <...> > As I said, these same people have been using the application without > problem until the last few days. I can't understand how several > independent people can simultaneously have the same problem. > > I had one of them download the XML object from the MS web site and > reinstall it to see if that helped, but it didn't. > > Any ideas? I'm completely baffled. TIA Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") ....Just a thought to work around the problem! LFS <snip>
>> Any ideas? I'm completely baffled. TIA Tried that, didn't work either.> >Have you tried using late binding? > > Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") > >...Just a thought to work around the problem! I just discovered that one of the people who is having a problem only gets this when she logs on (Windows 2000 Professional) as an ordinary user. Then she gets a "permission denied" error, even though she has been running this program for ages without any problems and hasn't changed anything on the machine recently. If she logs in as Administrator, she can create the object, but when it tries to send info to the URL, it gives an error "A connection with the server could not be established". She can see the URL in Internet Explorer, and she can ping the server without problem, so it's not a network issue. Other people are still getting the automation error when trying to create the object. Any other ideas? What I don't understand is why so many people are suddenly having a problem that appears to be a local one, not something to do with the server, whilst some others are not having any problems. Any further suggestions gratefully received. I'm in deep trouble here!! -- Alan Silver (anything added below this line is nothing to do with me) Alan,
Recent application of a Windows/Office service pack or update. NickHK Show quoteHide quote "Alan Silver" <alan-silver@nospam.thanx> wrote in message news:oFzhk$BTaYnCFwOy@nospamthankyou.spam... > <snip> > >> Any ideas? I'm completely baffled. TIA > > > >Have you tried using late binding? > > > > Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") > > > >...Just a thought to work around the problem! > > Tried that, didn't work either. > > I just discovered that one of the people who is having a problem only > gets this when she logs on (Windows 2000 Professional) as an ordinary > user. Then she gets a "permission denied" error, even though she has > been running this program for ages without any problems and hasn't > changed anything on the machine recently. > > If she logs in as Administrator, she can create the object, but when it > tries to send info to the URL, it gives an error "A connection with the > server could not be established". She can see the URL in Internet > Explorer, and she can ping the server without problem, so it's not a > network issue. > > Other people are still getting the automation error when trying to > create the object. > > Any other ideas? What I don't understand is why so many people are > suddenly having a problem that appears to be a local one, not something > to do with the server, whilst some others are not having any problems. > > Any further suggestions gratefully received. I'm in deep trouble here!! > > -- > Alan Silver > (anything added below this line is nothing to do with me) >Alan, I thought of that, but it's happened to too many people at once. I >Recent application of a Windows/Office service pack or update. honestly don't believe that they have all updated Windows in the past few days. The lady I mentioned below certainly hasn't. She wouldn't know how to, and asks me to do anything like that. Also, she's running W2K, which doesn't ask you to update. Any other ideas? Thanks. Show quoteHide quote >NickHK > >"Alan Silver" <alan-silver@nospam.thanx> wrote in message >news:oFzhk$BTaYnCFwOy@nospamthankyou.spam... >> <snip> >> >> Any ideas? I'm completely baffled. TIA >> > >> >Have you tried using late binding? >> > >> > Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") >> > >> >...Just a thought to work around the problem! >> >> Tried that, didn't work either. >> >> I just discovered that one of the people who is having a problem only >> gets this when she logs on (Windows 2000 Professional) as an ordinary >> user. Then she gets a "permission denied" error, even though she has >> been running this program for ages without any problems and hasn't >> changed anything on the machine recently. >> >> If she logs in as Administrator, she can create the object, but when it >> tries to send info to the URL, it gives an error "A connection with the >> server could not be established". She can see the URL in Internet >> Explorer, and she can ping the server without problem, so it's not a >> network issue. >> >> Other people are still getting the automation error when trying to >> create the object. >> >> Any other ideas? What I don't understand is why so many people are >> suddenly having a problem that appears to be a local one, not something >> to do with the server, whilst some others are not having any problems. >> >> Any further suggestions gratefully received. I'm in deep trouble here!! >> >> -- >> Alan Silver >> (anything added below this line is nothing to do with me) > > -- Alan Silver (anything added below this line is nothing to do with me) Alan,
Not that I know much about XML stuff but found this: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q302080&ID=KB;EN-US; Q302080 Certificate expired ? NickHK Show quoteHide quote "Alan Silver" <alan-silver@nospam.thanx> wrote in message news:cE78k5DzPZnCFw4U@nospamthankyou.spam... > >Alan, > >Recent application of a Windows/Office service pack or update. > > I thought of that, but it's happened to too many people at once. I > honestly don't believe that they have all updated Windows in the past > few days. The lady I mentioned below certainly hasn't. She wouldn't know > how to, and asks me to do anything like that. Also, she's running W2K, > which doesn't ask you to update. > > Any other ideas? Thanks. > > >NickHK > > > >"Alan Silver" <alan-silver@nospam.thanx> wrote in message > >news:oFzhk$BTaYnCFwOy@nospamthankyou.spam... > >> <snip> > >> >> Any ideas? I'm completely baffled. TIA > >> > > >> >Have you tried using late binding? > >> > > >> > Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") > >> > > >> >...Just a thought to work around the problem! > >> > >> Tried that, didn't work either. > >> > >> I just discovered that one of the people who is having a problem only > >> gets this when she logs on (Windows 2000 Professional) as an ordinary > >> user. Then she gets a "permission denied" error, even though she has > >> been running this program for ages without any problems and hasn't > >> changed anything on the machine recently. > >> > >> If she logs in as Administrator, she can create the object, but when it > >> tries to send info to the URL, it gives an error "A connection with the > >> server could not be established". She can see the URL in Internet > >> Explorer, and she can ping the server without problem, so it's not a > >> network issue. > >> > >> Other people are still getting the automation error when trying to > >> create the object. > >> > >> Any other ideas? What I don't understand is why so many people are > >> suddenly having a problem that appears to be a local one, not something > >> to do with the server, whilst some others are not having any problems. > >> > >> Any further suggestions gratefully received. I'm in deep trouble here!! > >> > >> -- > >> Alan Silver > >> (anything added below this line is nothing to do with me) > > > > > > -- > Alan Silver > (anything added below this line is nothing to do with me) >Alan, Thanks, but that wasn't it. The URL that is being accessed is on a >Not that I know much about XML stuff but found this: >http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q302080&ID=KB;EN-US; >Q302080 > >Certificate expired ? public SSL site, and I can see the site fine via IE without any messages about the certificate. Also, some of the errors being reported seem to be failure to create the XML object in the first place, before it even gets as far as trying to connect to a server. Thanks anyway Show quoteHide quote >NickHK > > >"Alan Silver" <alan-silver@nospam.thanx> wrote in message >news:cE78k5DzPZnCFw4U@nospamthankyou.spam... >> >Alan, >> >Recent application of a Windows/Office service pack or update. >> >> I thought of that, but it's happened to too many people at once. I >> honestly don't believe that they have all updated Windows in the past >> few days. The lady I mentioned below certainly hasn't. She wouldn't know >> how to, and asks me to do anything like that. Also, she's running W2K, >> which doesn't ask you to update. >> >> Any other ideas? Thanks. >> >> >NickHK >> > >> >"Alan Silver" <alan-silver@nospam.thanx> wrote in message >> >news:oFzhk$BTaYnCFwOy@nospamthankyou.spam... >> >> <snip> >> >> >> Any ideas? I'm completely baffled. TIA >> >> > >> >> >Have you tried using late binding? >> >> > >> >> > Set olXML = CreateObject("msxml2.serverXMLHTTP.3.0") >> >> > >> >> >...Just a thought to work around the problem! >> >> >> >> Tried that, didn't work either. >> >> >> >> I just discovered that one of the people who is having a problem only >> >> gets this when she logs on (Windows 2000 Professional) as an ordinary >> >> user. Then she gets a "permission denied" error, even though she has >> >> been running this program for ages without any problems and hasn't >> >> changed anything on the machine recently. >> >> >> >> If she logs in as Administrator, she can create the object, but when it >> >> tries to send info to the URL, it gives an error "A connection with the >> >> server could not be established". She can see the URL in Internet >> >> Explorer, and she can ping the server without problem, so it's not a >> >> network issue. >> >> >> >> Other people are still getting the automation error when trying to >> >> create the object. >> >> >> >> Any other ideas? What I don't understand is why so many people are >> >> suddenly having a problem that appears to be a local one, not something >> >> to do with the server, whilst some others are not having any problems. >> >> >> >> Any further suggestions gratefully received. I'm in deep trouble here!! >> >> >> >> -- >> >> Alan Silver >> >> (anything added below this line is nothing to do with me) >> > >> > >> >> -- >> Alan Silver >> (anything added below this line is nothing to do with me) > > -- Alan Silver (anything added below this line is nothing to do with me) >>Certificate expired ? Well, I'm happy to say that I think I have found the source of the > >Thanks, but that wasn't it. The URL that is being accessed is on a >public SSL site, and I can see the site fine via IE without any >messages about the certificate. > >Also, some of the errors being reported seem to be failure to create >the XML object in the first place, before it even gets as far as trying >to connect to a server. problem. I used to do data access between a client app and a remote server by opening an ADO connection and communicating directly with an SQL Server. The people who maintain our server decided (quite sensibly) that having port 1433 open was a big security risk. We worked out a solution whereby data access could be done via a secure web page using the MS XML object. We rebuilt the server last week and closed off port 1433. That was when the problems started, but as the errors were apparently nothing to do with the data access, I was thrown off the scent. I just discovered, whilst tracing packets with the server people, that the application was still trying to open an ADO connection at one point. This was failing as the server is no longer visible from the Internet, but for some weird reason, the XML object was giving very spurious and unhelpful error messages. I hope this info is helpful to anyone searching the archives in the future. -- Alan Silver (anything added below this line is nothing to do with me) |
|||||||||||||||||||||||