Always Invalid Class Typecast (?)
Posted: Sun 19 Jan 2020 09:58
Hello
I am trying to use Devart SecureBridge version 9.2 for RadStudio 10.2
Everything I try results in an Invalid Class Typecast exception, including when I try many demonstrated existing samples, such as this.
and also this, attempting to use SignalR with a TscHubConnection:
I have tried using the various methods, settings and parameters. The program only ever responds with a fairly vague error of "Invalid Class Typecast"
Why wouldn't these samples work. I see others have had the same issues and reported them, but even the samples do not operate successfully on my testing. I appreciate any suggestions.
I am trying to use Devart SecureBridge version 9.2 for RadStudio 10.2
Everything I try results in an Invalid Class Typecast exception, including when I try many demonstrated existing samples, such as this.
Code: Select all
procedure TBM_System_Form.BMSocket2ConnectionBtnClick(Sender: TObject);
var
Request: TScHttpWebRequest;
Response: TScHttpWebResponse;
ResponseStr: string;
Buf: TBytes;
URL : String;
begin
try
Request := TScHttpWebRequest.Create('https://esta.cbp.dhs.gov/esta/');
try
Response := Request.GetResponse; // gives invalid typecast
try
ResponseStr := Response.ReadAsString;
Memo1.Lines.Text := ResponseStr;
finally
Response.Free;
end;
finally
Request.Free;
end;
except
on E: Exception do
begin
Memo1.Lines.Add('GetTokenBtnClick. Error: '+E.ToString);
end;
end;
end; {procedure}
Code: Select all
procedure TBM_System_Form.BMConnect;
type
SignalRClient: TScHubConnection;
...
begin
SignalRClient.Url := BMHubConnS+','+'token='+AuthKey+'';
SignalRClient.Register('gpsfeed', ProcessMsg, [varString]);
SignalRClient.Start; // <- gives invalid typecast
end;
Why wouldn't these samples work. I see others have had the same issues and reported them, but even the samples do not operate successfully on my testing. I appreciate any suggestions.