Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   DelphiXE8 and WSDL, disable authentication via Smart Card Reader (https://www.delphipraxis.net/202324-delphixe8-wsdl-disable-authentication-via-smart-card-reader.html)

carmeloconny 30. Nov 2019 11:29

AW: DelphiXE8 and WSDL, disable authentication via Smart Card Reader
 
Excuse my absence for all those who helped me.
The problem has not been resolved.
looking for a solution on the internet, I realized that I have to use WinHttp instead of WinINet.
WinHttp should not display dialogs, which is what I want.


I tried to replace, in HTTPRIOHTTPWebNode1BeforePost:
Code:
   auth := 'Authorization: Basic ' + TNetEncoding.Base64.Encode(FUserName + ':' + FPassword);

   if not HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD) then
   ShowMessage('HttpAddRequestHeaders' + SysErrorMessage(GetLastError()));
with
Code:
   auth := 'Authorization: Basic ' + TNetEncoding.Base64.Encode(FUserName + ':' + FPassword);
   if not WinHttpAddRequestHeaders(Data, PChar(auth), Length(auth), WinHTTP_ADDREQ_FLAG_ADD) then
   ShowMessage('WinHttpAddRequestHeaders: ' + SysErrorMessage(GetLastError()));
this doesn't work,error "handle is invalid".
how can I use WinHttp with HttpRio?

carmeloconny 12. Dez 2019 08:33

AW: DelphiXE8 and WSDL, disable authentication via Smart Card Reader
 
I solved :-D it by calling the onWinInetError event of the HttpRio component.
Thanks to all, maybe the solution can serve others.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:50 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz