Question:
Hi, in ver. 9.3.1, NTLM auth. failed in: NtlmChallenge2: Digestrealk=
NtlmChallenge2: Digestrealk=
TYPE2 message is not long enough.
Failed to decode TYPE2 input message.
Failed to generate TYPE3 message in NTLM POST.
sendRequestTime: Elapsed time: 31 millisec
--sendRequestGetResponse_1
PostXml request failed.
--PostXml --ChilkatLog
now, in ver. 9.3.2, NTLM auth. failed in:
NtlmChallenge2: Digestrealk=
TYPE2 message is not long enough.
msgLen: 8
Failed to decode TYPE2 input message.
Failed to generate TYPE3 message in NTLM POST.
sendRequestTime: Elapsed time: 203 millisec
--sendRequestGetResponse_1
PostXml request failed.
--PostXml --ChilkatLog
Where do I make a mistake?
Test using the very latest version. This could very well be something that is already fixed...
ChilkatLog:
PostXml:
DllDate: Aug 5 2012
UnlockPrefix: GABRIEHttp
Username: APP_PROXIO_TST:gsoft_matrika
Architecture: Little Endian; 32-bit
Language: ActiveX
VerboseLogging: 0
url: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05
charset: utf-8
xmlSizeInChars: 2248
HttpLogin: matrika
A password has been provided.
httpConnect:
hostname: app_proxio_tst
port: 8440
ssl: 0
Need to establish connection to the HTTP server...
ConnectTimeoutMs_1: 10000
calling ConnectSocket2
IPV6 enabled connect with NO heartbeat.
connectingTo: app_proxio_tst
dnsCacheLookup: app_proxio_tst
dnsCacheHit: 172.25.95.74
GetHostByNameHB_ipv4: Elapsed time: 0 millisec
myIP_1: 172.25.95.74
myPort_1: 2776
connect successful (1)
Connected
--httpConnect
connectTime1: Elapsed time: 0 millisec
sendRequestGetResponse_1:
Not auto-adding cookies.
t1_flags: 0x8b207
--- exchangePacketRequest ---
-- NTLM Authentication Request ---
authRequest: POST /xzr3/xzr/webservices/digest/e05 HTTP/1.1
User-Agent: Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp) SOAPAction: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05/IszrRobCtiPodleUdaju Host: app_proxio_tst Accept: / Accept-Charset: ISO-8859-1,utf-8;q="0.7,*"; q="0.7" Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip Content-Length: 0 Authorization: NTLM TlRMTVNTUAABAAAAB7IIAA4ADgAgAAAADgAOAC4AAABhcHBfcHJveGlvX3RzdEFQUF9QUk9YSU9fVFNU
----------------------------------
SendBytesAndAccumulate_nonSSL:
chunkSize1: 800
chunkSize1_count: 20
chunkSize2: 65535
--SendBytesAndAccumulate_nonSSL
---- Reading HTTP Authorization Response ----
responseContentLength: 1135
Discarding repsonse body...
OK, received 401/403 POST response as expected...
authResponseHeader: Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=F832E0F77B2C8D8B398E15A34302C6F1; Path="/xzr3"; HttpOnly WWW-Authenticate: Digest realm="PROXIO - Marbes Consulting s.r.o.", qop="auth", nonce="MTM0OTA3NjM2NjE1NTpjNmFhZGYwNTE3YTcxODZjNTA5NmM4YmEzMWFkZDMyYw==" Content-Type: text/html; charset="utf-8" Content-Length: 1135 Date: Mon, 01 Oct 2012 07:21:06 GMT NtlmChallenge2: Digestrealk= TYPE2 message is not long enough. msgLen: 8 Failed to decode TYPE2 input message. Failed to generate TYPE3 message in NTLM POST. sendRequestTime: Elapsed time: 0 millisec httpConnect: hostname: app_proxio_tst port: 8440 ssl: 0 Should already be connected to the HTTP server... Connected --httpConnect connectTime5: Elapsed time: 0 millisec Not auto-adding cookies. t1_flags: 0x8b207 --- exchangePacketRequest --- -- NTLM Authentication Request --- authRequest: POST /xzr3/xzr/webservices/digest/e05 HTTP/1.1 User-Agent: Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp) SOAPAction: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05/IszrRobCtiPodleUdaju Host: app_proxio_tst Accept: / Accept-Charset: ISO-8859-1,utf-8;q="0.7,*"; q="0.7" Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip Content-Length: 0 Authorization: NTLM TlRMTVNTUAABAAAAB7IIAA4ADgAgAAAADgAOAC4AAABhcHBfcHJveGlvX3RzdEFQUF9QUk9YSU9fVFNU
----------------------------------
SendBytesAndAccumulate_nonSSL:
chunkSize1: 800
chunkSize1_count: 20
chunkSize2: 65535
--SendBytesAndAccumulate_nonSSL
---- Reading HTTP Authorization Response ----
responseContentLength: 1135
Discarding repsonse body...
OK, received 401/403 POST response as expected...
authResponseHeader: Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=D650A24499F851C986B13D6E31E76612; Path="/xzr3"; HttpOnly WWW-Authenticate: Digest realm="PROXIO - Marbes Consulting s.r.o.", qop="auth", nonce="MTM0OTA3NjM2NjE3MTo5YTMzMmViMDM0YzYxYTVlODYzYzg4YjRhMzJmMDc2ZA==" Content-Type: text/html; charset="utf-8" Content-Length: 1135 Date: Mon, 01 Oct 2012 07:21:06 GMT NtlmChallenge2: Digestrealk= TYPE2 message is not long enough. msgLen: 8 Failed to decode TYPE2 input message. Failed to generate TYPE3 message in NTLM POST. sendRequestTime: Elapsed time: 16 millisec --sendRequestGetResponse_1 PostXml request failed. --PostXml --ChilkatLog
LastHeader:
Check to see if this new build solves the problem:
http://www.chilkatsoft.com/preRelease/ChilkatHttp.zip
ChilkatLog: PostXml: DllDate: Sep 25 2012 UnlockPrefix: GABRIEHttp Username: APP_PROXIO_TST:gsoft_matrika Architecture: Little Endian; 32-bit Language: ActiveX VerboseLogging: 0 url: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05 charset: utf-8 xmlSizeInChars: 2209 HttpLogin: matrika A password has been provided. httpConnect: hostname: app_proxio_tst port: 8440 ssl: 0 Need to establish connection to the HTTP server... ConnectTimeoutMs_1: 10000 calling ConnectSocket2 IPV6 enabled connect with NO heartbeat. connectingTo: app_proxio_tst resolveHostname1: dnsCacheLookup: app_proxio_tst dnsCacheHit: 172.25.95.74 --resolveHostname1 GetHostByNameHB_ipv4: Elapsed time: 0 millisec myIP_1: 172.25.95.74 myPort_1: 1804 connect successful (1) Connected --httpConnect connectTime1: Elapsed time: 0 millisec sendRequestGetResponse_1: sendRequest: Not auto-adding cookies. t1_flags: 0x8b207 --- exchangePacketRequest --- -- NTLM Authentication Request --- authRequest: POST /xzr3/xzr/webservices/digest/e05 HTTP/1.1 User-Agent: Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp) SOAPAction: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05/IszrRobCtiPodleUdaju Host: app_proxio_tst Accept: */* Accept-Charset: ISO-8859-1,utf-8;q="0.7,*"; q="0.7" Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip Content-Length: 0 Authorization: NTLM TlRMTVNTUAABAAAAB7IIAA4ADgAgAAAADgAOAC4AAABhcHBfcHJveGlvX3RzdEFQUF9QUk9YSU9fVFNU ---------------------------------- ---- Reading HTTP Authorization Response ---- readResponse2_5: responseContentLength: 1135 Discarding repsonse body... --readResponse2_5 OK, received 401/403 POST response as expected... authResponseHeader: Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=81398CA2F50E735A470F99FBF0CCAABB; Path="/xzr3"; HttpOnly WWW-Authenticate: Digest realm="PROXIO - Marbes Consulting s.r.o.", qop="auth", nonce="MTM0OTMzNzUwMzQ0NTo2NzY2MDlkMWY3MDY3MTE5ZTgwNjkyYjI5NDA2OTAzZg==" Content-Type: text/html; charset="utf-8" Content-Length: 1135 Date: Thu, 04 Oct 2012 07:53:23 GMT NtlmChallenge2: Digestrealk= TYPE2 message is not long enough. msgLen: 8 Failed to decode TYPE2 input message. Failed to generate TYPE3 message in NTLM POST. --sendRequest sendRequestTime: Elapsed time: 31 millisec httpConnect: hostname: app_proxio_tst port: 8440 ssl: 0 Should already be connected to the HTTP server... Connected --httpConnect connectTime5: Elapsed time: 0 millisec sendRequest: Not auto-adding cookies. t1_flags: 0x8b207 --- exchangePacketRequest --- -- NTLM Authentication Request --- authRequest: POST /xzr3/xzr/webservices/digest/e05 HTTP/1.1 User-Agent: Chilkat/1.0.0 (+http://www.chilkatsoft.com/ChilkatHttpUA.asp) SOAPAction: http://app_proxio_tst:8440/xzr3/xzr/webservices/digest/e05/IszrRobCtiPodleUdaju Host: app_proxio_tst Accept: */* Accept-Charset: ISO-8859-1,utf-8;q="0.7,*"; q="0.7" Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip Content-Length: 0 Authorization: NTLM TlRMTVNTUAABAAAAB7IIAA4ADgAgAAAADgAOAC4AAABhcHBfcHJveGlvX3RzdEFQUF9QUk9YSU9fVFNU ---------------------------------- ---- Reading HTTP Authorization Response ---- readResponse2_5: responseContentLength: 1135 Discarding repsonse body... --readResponse2_5 OK, received 401/403 POST response as expected... authResponseHeader: Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=1E4A366873CFB8AB9ECAAAF1E2FA583C; Path="/xzr3"; HttpOnly WWW-Authenticate: Digest realm="PROXIO - Marbes Consulting s.r.o.", qop="auth", nonce="MTM0OTMzNzUwMzQ2MTpmNzQxZDcxNDlmNjMwMDZiMzcxNGIwZDNhMWUxNzA3Nw==" Content-Type: text/html; charset="utf-8" Content-Length: 1135 Date: Thu, 04 Oct 2012 07:53:23 GMT NtlmChallenge2: Digestrealk= TYPE2 message is not long enough. msgLen: 8 Failed to decode TYPE2 input message. Failed to generate TYPE3 message in NTLM POST. --sendRequest sendRequestTime: Elapsed time: 16 millisec --sendRequestGetResponse_1 PostXml request failed. --PostXml --ChilkatLog LastHeader:
I think the problem is that your app indicates that Chilkat HTTP should use NTLM authentication (it must've set the ChilkatHttp.NtlmAuth property = 1. Because of this, the Chilkat HTTP POST sends the 1st HTTP request assuming that NTLM authentication is going to be used, and therefore includes the Authorization header (Authorization: NTLM TlRMTVNTUAABA...) to begin the back-and-forth NTLM exchange. However, the web server's response indicates that NTLM is not an accepted authentication method. The only "WWW-Authenticate" header in the response is for digest authentication:
WWW-Authenticate: Digest realm="PROXIO - Marbes Consulting s.r.o.",...
But given that the app indicated that NTLM should be used, Chilkat HTTP continues with the NTLM package-exchange process and ultimately fails.
The solution is to set the ChilkatHttp.DigestAuth property = 1 instead of setting NtlmAuth = 1.