-1

I am calling a web page from a VB application to perform a validation, something like :

Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")    
...
objXMLHTTP.Open "GET", ls_address, False
objXMLHTTP.Send

The value of objXMLHTTP.Status is 0 in Windows7 and 200 in Windows10. I have a lot of people that started to have this problem yesterday (2018-01-29) so I am thinking that a Windows 7 update might have caused this?

Also, my ls_address is https://... and I have the problem in Windows7, but when I change it to http://... it works again. Both work in Windows10.

Anybody has a clue where to look, Windows Defender, Microsoft Security Essentials, etc. ???

Philippe
  • 548
  • 8
  • 24
  • Do you have port 443 blocked? – K.Dᴀᴠɪs Jan 30 '18 at 21:24
  • What would block it? I tried 2 computers in the same network, one with Windows7 and one Windows10. Only the Windows 7 has the problem. – Philippe Jan 30 '18 at 21:26
  • Sounds more like an IT/configuration issue than a programming problem though. I doubt VBA is even relevant here, could be any client. – Mathieu Guindon Jan 30 '18 at 21:48
  • Your firewall or router could block the port. I find it odd that it works on HTTP (which is through port 80), but HTTPS is blocked (which is port 443). Honestly, I would be surprised if it was blocked - but I am not thinking of any other solution other than what @Mat'sMug stated. I would at least check your UPnP or NAT settings before thinking of all the other _elegant_ solutions – K.Dᴀᴠɪs Jan 30 '18 at 22:12
  • 1
    Its going to be [a cypher issue](https://stackoverflow.com/a/36217219/692942), you need to make sure your using TLS1.2 or above as SSL 3.0 is now deprecated. That's likely what has been updated in Windows 7. – user692942 Jan 31 '18 at 01:36
  • I'm confused 200 in HTTP means Success and it is finished. – ACatInLove Jan 31 '18 at 04:04
  • From *Wininet.h* `#define HTTP_STATUS_OK 200 // request completed` – ACatInLove Jan 31 '18 at 04:43
  • @ACatInLove, you are right 200 is ok, but I only get 200 on a windows 10 computer. 0 with a windows 7 computer. – Philippe Aug 23 '18 at 19:44

3 Answers3

0

Try adding this line of code:

objXMLHTTP.setRequestHeader "Origin", ls_address 

Also: is there any authentication needed?

  • Why do you think adding this line of code will solve the problem, can you explain your thinking? – Philippe Jan 31 '18 at 15:46
  • I had a similar problem accessing a JIRA site and adding this line of code resolved the problem. As I am not sure it specifically relates to JIRA sites, I suggested this solution. –  Jan 31 '18 at 15:54
0

The problem was not with a windows 7 update as I tought first, but rather a security update on the web server that caused trouble only with windows 7 clients.

As mentionned by Lankymart, it is related to SSL/TLS protocols or cyphers. I am not sure if I could code something different in VBA to make it work. I tried using Server.CreateObject ("MSXML2.XMLHTTP.6.0"), but it did not work in my vba environment.

As a temporary solution, the update on the web server was undone and everything went back to normal.

Philippe
  • 548
  • 8
  • 24
0

TLS version 1.2 update in Windows Server 2008 R2, 2012, and Windows 7 https://support.site24x7.com/portal/en/kb/articles/to-update-to-tls-version-1-2

  • You probably could explain a little more what to do and what's explained on the link. Ideally your answer would be self explicit without following the link. – XavM Jun 15 '21 at 09:53