Article View: borland.public.cppbuilder.internet.socket
Article #493Indy with TIdHTTP and Windows Authentication
From: Aladin J.
Date: Wed, 05 Mar 2008 12:58
Date: Wed, 05 Mar 2008 12:58
62 lines
3590 bytes
3590 bytes
Follow to my previous about TIdHTTP and Windows Authentication. I thought it is quite nearly closed. Anybody help ?? "Aladin J." <j_aladin@hotmail.com> wrote in message news:47b38c15@newsgroups.borland.com... >I try changing to use TIdSSPINTLMAuthentication instead BUT caused by the >package of Indy 9.0.xx does not provide for C++. > > I have to add IdAuthenticationSSPI.pas and IdSSPI.pas in Indy60.dpk first > and the build new package which it works OK, no error found. > > But when I complied program by including <IdAuthenticationSSPI.hpp> there > generates too many errors and I cannot fix them (Most in file IdSSPI.hpp > and IdAuthenticationSSPI.hpp which automatically generated from compiler). > > Example error: > IdSSPI.hpp(866): E2040 Declaration terminated incorrectly. > IdSSPI.hpp(867): E2040 Declaration terminated incorrectly. > IdAuthenticationSSPI.hpp(866): E2238 Multiple declaration for '_fastcall > ESSPIException::ESSPIException(AnsiString,int)' > > Is this a right way to handle this task? > > Aladin J. > > "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message > news:47b37b92$1@newsgroups.borland.com... >> >> "Aladin J." <j_aladin@hotmail.com> wrote in message >> news:47b3658e@newsgroups.borland.com... >> >>> WWW-Authenticate: Negotiate >>> WWW-Authenticate: NTLM >> >> The server is asking for "Negotiate" first. You have to use >> TIdSSPINTLMAuthentication instead of TIdNTLMAuthentication for that. >> However, since the server is also stating that "NTLM" is supported, then >> TIdNTLMAuthentication should have worked ok. Something else has to be >> happening. Since TIdNTLMAuthentication's constructor loads the OpenSSL >> DLLs, you probably don't have the right version installed. That is the >> only thing I can think of that would cause the constructor to throw an >> exception. >> >>> I supprise in request caused by it should have more tag liked >>> "Authorization: NTLM TlRMTVNTUAA..........." but it's gone. >> >> TIdHTTP does not send authorization credentials unless the server >> explicitally asks for them first. In this case, you sent a request, and >> the server replied asking for the credentials. There should have been a >> second request sent automatically after that which included the >> credentials that TIdNTLMAuthentication generates. Of course, if you >> can't create the TIdNTLMAuthentication object to begin with, then it >> won't be available to generate that data. >> >> >> Gambit >> >> >
Technical Details
Message-ID:
<47ce98a4@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fa03a5bdfa9d2b95,start X-Google-Attributes: gid11508e,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Aladin J." <j_aladin@hotmail.com> From: "Aladin J." <j_aladin@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Indy with TIdHTTP and Windows Authentication Date: Wed, 5 Mar 2008 19:58:14 +0700 Lines: 63 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6000.16480 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16545 NNTP-Posting-Host: 58.136.117.11 Message-ID: <47ce98a4@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1204721828 58.136.117.11 (5 Mar 2008 04:57:08 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feed.tweaknews.nl!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail