EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Proxy over HTTP

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#26594
Posted: 09/24/2013 13:56:12
by Eduardo Helminsky (Standard support level)
Joined: 08/20/2010
Posts: 102

Hello

I am playing with another weird error.

Scenario:

1) Webservice1: HTTPS
2) Webservice2: HTTP

In 1) all my customers is working so good with or without proxy

In 2) almost all my customers is working good without proxy, some using Basic authentication is working but there is only one that uses ISA Server and therefore I am using wtaNTLM authentication for both HTTPS (is working) and HTTP (the proxy results in 407 http error).

The code I am using is the following, and I am using ProxyAuth = 'Windows'

FHttpsClient.UseHTTPProxy := False;
FHttpsClient.UseWebtunneling := False;
if ProxyHost <> '' then begin
if UpperCase(Copy(cWebService,1,5)) = 'HTTPS' then begin
FHttpsClient.UseWebtunneling := True;
FHttpsClient.WebTunnelAddress := ProxyHost;
FHttpsClient.WebTunnelPort := StrToIntDef(ProxyPort,0);
FHttpsClient.WebTunnelAuthentication := wtaNoAuthentication;
if ProxyUserName <> '' then begin
if (ProxyAuth = '') or (ProxyAuth = 'Básico') then begin
FHttpsClient.WebTunnelAuthentication := wtaBasic;
end else if ProxyAuth = 'Windows' then begin
FHttpsClient.WebTunnelAuthentication := wtaNTLM;
end else if ProxyAuth = 'Digest' then begin
FHttpsClient.WebTunnelAuthentication := wtaDigest;
end;
FHttpsClient.WebTunnelUserId := ProxyUserName;
FHttpsClient.WebTunnelPassword := ProxyPassword;
end;
end else begin
FHttpsClient.UseHttpProxy := True;
FHttpsClient.HttpProxyHost := ProxyHost;
FHttpsClient.HttpProxyPort := StrToIntDef(ProxyPort,0);
FHttpsClient.HTTPProxyAuthentication := wtaNoAuthentication;
if ProxyUserName <> '' then begin
if (ProxyAuth = '') or (ProxyAuth = 'Básico') then begin
FHttpsClient.HTTPProxyAuthentication := wtaBasic;
end else if ProxyAuth = 'Windows' then begin
FHttpsClient.HTTPProxyAuthentication := wtaNTLM;
end else if ProxyAuth = 'Digest' then begin
FHttpsClient.HTTPProxyAuthentication := wtaDigest;
end;
FHttpsClient.HttpProxyUsername := ProxyUserName;
FHttpsClient.HttpProxyPassword := ProxyPassword;
end;
end;
end;

Am I missing something ?
#26596
Posted: 09/25/2013 01:07:46
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Your code is correct. You should check ISA logs. They may highlight the reason of your problem.

FYI: please use CODE tag next time for your code snippets.

Reply

Statistics

Topic viewed 671 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!