简体   繁体   中英

Can TRESTClient in Delphi Rio be made to work in Windows XP?

Using TRESTClient components I have added the ability of my app CW_EPG to access the SchedulesDirect.org JSON database under Windows 7 and higher, but running the app in Windows XP produces only the following error upon attempting to access the site: Error: REST request failed: Error sending data: (12007) The server name or address could not be resolved . I've tried enabling/disabling various of the controls listed in the Object Inspector, but have not succeeded in changing that error message. Am I missing something or is this Rio subsystem just incompatible with XP?

FWIW, here's the relevant code segment (the base URL is set in Object Inspector for RESTClient1 to https://json.schedulesdirect.org/20141201 ):

  RESTRequest1.ClearBody;
  RESTRequest1.AddBody('{"username":"' + userID
    + '", "password":"' + THashSHA1.GetHashString(userPass) + 
    '"}',ctTEXT_PLAIN);
  RESTRequest1.Method := rmPOST;
  RESTRequest1.Resource := 'token';
  RESTResponse1.RootElement := '';
  try
    RESTRequest1.Execute;
  except on E:Exception do
    begin
      ShowMessage('Error: ' + E.Message);
      exit;
    end;
  end;

It seems that TRESTClient will work in Windows XP, but only after one has applied the hacks to "spoof" an XP POSReady installation and thereby enable TLS 1.1 and 1.2. See, eg, this page: https://msfn.org/board/topic/178092-enable-tls-11-and-12-in-windows-xp-correctly/

BTW, @Remy Lebeau, Embarcadero's remote debugger also fails to work on my XP VM, which I thought likely due to its being a stripped down "nLite" XP installation. However, I have now constructed a full XP-SP3 (POSReady) VM and the remote debugger (paserver) also fails on that installation looking for a non-existent entry point in KERNEL32.dll .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM