Authentication can easily give Runtime 217 errors

Giganews Newsgroups
Subject: Authentication can easily give Runtime 217 errors
Posted by:  dk_sz (dk_…@hotmail.com)
Date: Mon, 18 Dec 2006

If I add these units to use clause:

  idAuthenticationSSPI
  IdAuthenticationNTLM
  IdAuthenticationDigest

I get Runtime Error 217 because an
exception is raised before SysUtils in initialized.

In *Initlization* NTLM calls
*  RegisterAuthenticationMethod('NTLM', TIdNTLMAuthentication);

which, if NTLM is already found, does:

*  raise
EIdAlreadyRegisteredAuthenticationMethod.Create(Sys.Format(RSHTTPAuthAlreadyRegistered,
      [TAuthListObject(AuthList.Objects[AuthList.IndexOf(MethodName)]).Auth.ClassName]));

Is this intended behaior?

I kinda thought one was supposed to add
authentication units to use clauses oneself?
This seems impossible.

(Since one can not easily know if other units,
e.g. Indy, also haveadded those units !?!)

best regards
Thomas Schulz

Replies