Login  
Search All Forums
Dart Home | PowerTCP Web for ActiveX | Custom Development Reply | PowerTCP Web for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web for ActiveX
Topic: Basic Authentification not working
gdhion

From: Nantes, France
Posts: 2
Member Since: 07/08/04
posted July 8, 2004 6:12 AM

Hello,

I'm having a problem with Web Tool. I try to access a web page which is protected with basic authentification.

I'm using :
HTTP1.Get strResultat, , strUser, strPassword

It works perfectly at home, with or without a proxy.

At the customer, however, it doesn't work. What he receives is a "401 error authorization required" from apache. When he tries to access the page with Internet Explorer, the authentification works fine. He is behind an ISA proxy (which I can't install at home).

I don't have a clue what it is due to.

Do you have an idea ?

Thank you in advance.

Regards,

Guillaume Dhion
ImmoStore.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 8, 2004 9:16 AM

Can you get a sniffer on the customers computer? The easiest solution would be to trace an IE session and compare it to a trace of your program.

If you can't do that, I would suggest getting the same proxy he has and running some tests at your site.
gdhion

From: Nantes, France
Posts: 2
Member Since: 07/08/04
posted July 9, 2004 5:02 AM

Thank you for your answer.

I've done some tests at the customer site with Ethereal. I've extracted what I think is important from the trace. I can send you the complete Ethereal files if you want.

Trace with Web Tool :

192.168.0.109 172.17.0.8 HTTP GET http://ftp.immostore.com/MajAMI/AC00009354/index.html HTTP/1.0
Accept : */*\r\n
User-Agent: Dart Communications PowerTCP\r\n
Host: ftp.immostore.com\r\n
Proxy-Connection: Keep-Alive\r\n
\r\n

172.17.0.8 192.168.0.109 HTTP HTTP/1.1 407 Proxy Authentification Required ( Le serveur ISA requiert l'autorisation d'ex\351cuter la demande. L'acc\350s au service du proxy Web est refus\351. )\r\n
Via:1.1 CERBERE\r\n
Proxy-Authenticate: NTLM\r\n
Proxy-Authenticate: Kerberos\r\n
Proxy-Authenticate: Negotiate\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
Content-Type: text/html\r\n
Content-Length: 2505 \r\n

172.17.0.8 192.168.0.109 HTTP Continuation

192.168.0.109 172.17.0.8 HTTP GET http://ftp.immostore.com/MajAMI/AC00009354/index.html HTTP/1.0, NTLMSSP_NEGOTIATE
Accept : */*\r\n
User-Agent: Dart Communications PowerTCP\r\n
Host: ftp.immostore.com\r\n
Proxy-Connection: Keep-Alive\r\n
Proxy-Authorization: NTLM TlRMTVNTUAAB...
\r\n

172.17.0.8 192.168.0.109 HTTP HTTP/1.1 407 Proxy Authentification Required ( Acc\350s Refus\351. ), NTLMSSP_CHALLENGE
Via:1.1 CERBERE\r\n
Proxy-Authenticate: NTLM TlRMTVNTUAAC...
Connection : Keep-Alive\r\n
Proxy-Connection: Keep-Alive\r\n
Pragma: no-cache\r\n
Cache-Control: no-cache\r\n
Content-Type: text/html\r\n
Content-Length: 0    \r\n

192.168.0.109 172.17.0.8 HTTP GET http://ftp.immostore.com/MajAMI/AC00009354/index.html HTTP/1.0, NTLMSSP_AUTH
Accept : */*\r\n
User-Agent: Dart Communications PowerTCP\r\n
Host: ftp.immostore.com\r\n
Proxy-Connection: Keep-Alive\r\n
Proxy-Authorization: NTLM TlRMTVNTUAAD...
\r\n

172.17.0.8 192.168.0.109 HTTP HTTP/1.1 401 Authorization Required (text/html)
Via:1.1 CERBERE\r\n
Connection : Keep-Alive\r\n
Proxy-Support: Session-Based-Authentification\r\n
Content-Length: 486\r\n
Date: Fri, 09 Jul 2004 08:04:00 GMT\r\n
Content-Type: text/html; charset=iso-8859-1\r\n
Server: Apache/2.0.48 (Fedora)\r\n
WWW-Authenticate: Basic realm="Acc\350s s\351curis\351 au site AMI"\r\n
Keep-Alive: timeout=15, max=100\r\n

[End]


Trace with Internet Explorer:

[Beginning is much the same as with Web Tool]

172.17.0.8 192.168.0.109 HTTP HTTP/1.1 401 Authorization Required (text/html)
Via:1.1 CERBERE\r\n
Connection : Keep-Alive\r\n
Proxy-Support: Session-Based-Authentification\r\n
Content-Length: 486\r\n
Date: Fri, 09 Jul 2004 08:11:06 GMT\r\n
Content-Type: text/html; charset=iso-8859-1\r\n
Server: Apache/2.0.48 (Fedora)\r\n
WWW-Authenticate: Basic realm="Acc\350s s\351curis\351 au site AMI"\r\n
Keep-Alive: timeout=15, max=100\r\n

192.168.0.109 172.17.0.8 HTTP GET http://ftp.immostore.com/MajAMI/AC00009354/index.html HTTP/1.0
Accept : image/gif, image/x-bitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\r\n
Accept-Language: fr\r\n
Authorization: Basic YW1pOmJhdG5hbQ==\r\n
Credentials: ami:batnam
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\n
Host: ftp.immostore.com\r\n
Proxy-Connection: Keep-Alive\r\n
\r\n

172.17.0.8 192.168.0.109 HTTP HTTP/1.1 200 OK (text/html)
...
[End]


I think the problem comes from the fact that your tool doesn't send another request with Basic Authentification credentials after having received the 401 error page (though it does in my company just like IE does at the customer site).

Can you please help me ?

Thank you.

Guillaume Dhion
ImmoStore.
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted July 9, 2004 8:59 AM

This is going to be too complex for the forum. Please zip the log(s) and send to support@dart.com and we will take it from there.

whiprush

From: Springfield, MO USA
Posts: 9
Member Since: 05/13/03
posted June 23, 2005 12:45 PM

This is an old post, but I'm having a similar problem when trying to use a Get statement.

This is the code I'm using (in VB6):

objHttps.URL = objHttps.UrlScheme & "://" & objHttps.UrlRemoteHost & objHttps.UrlPath & sMask
objHttps.Head objResponse, msLogonID, msLogonPswd
objRequest.Add ("Authorization: Basic QU5QQUNfSFRUUFM6V3F0WjZ2Mzc=")
objHttps.GetEx objRequest, sContent, objResponse, msLogonID, msLogonPswd

This is what I get back with a packet sniffer:

11:39:08.250 HEAD /AgentFTP/Auth/a0001.txt HTTP/1.1 165 0xE88 0x34C 13369356 <IP Address>
Accept: */* User-Agent: Dart Communications PowerTCP Host: secure.web.info Content-Length: 0 Connection: Keep-Alive
11:39:09.328 HTTP/1.1 401 Unauthorized 255 0xE88 0x34C 13369356 192.168.220.18:443
Content-Length: 1539 Content-Type: Text Document Server: Microsoft-IIS/6.0 WWW-Authenticate: Negotiate WWW-Authenticate: NTLM MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET Date: Thu, 23 Jun 2005 16:39:10 GMT
11:39:09.562 GET /AgentFTP/Auth/a0001.txt HTTP/1.1 145 0xE88 0x2C0 13369356 192.168.220.18:443
Accept: */*
User-Agent: Dart Communications PowerTCP Host: secure.web.info
Connection: Keep-Alive
11:39:09.625 HTTP/1.1 401 Unauthorized 255 0xE88 0x2C0 13369356 192.168.220.18:443
Content-Length: 1539
Content-Type: Text Document
Server: Microsoft-IIS/6.0
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Date: Thu, 23 Jun 2005 16:39:10 GMT
Tony Priest



From: Utica, NY USA
Posts: 8466
Member Since: 04/11/00
posted June 23, 2005 1:01 PM

The same answer as above still applies. The issue would be too complex to debug on the forum so you should contact support@dart.com to discuss the other options.
Reply | PowerTCP Web for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX