Does NTLM support PreAuthentication?
From: Jon (NOSPAMgo_bills_at_hotmail.com)
Date: 06/25/03
- Next message: mrwoopey: "Re: How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted")"
- Previous message: Richard Mueller [MVP]: "Re: How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted")"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 25 Jun 2003 10:52:44 -0700
SCENARIO:
I have an ASP.NET application (configured to use Windows Integrated Security
only) that makes a call (using DefaultCredentials and with
PreAuthenticate=true) to a Web Service (configured to use Windows Integrated
Security only). This works fine, with one exception. The call to the Web
Service initially attempts to authenticate as anonymous (costing roughly one
second and producing 401 HTTP status messages in the IIS log) before
succeeding with NTLM and the DefaultCredentials (200 HTTP).
SOME CODE:
The following code (calling "CanPreAuthenticate" on all registered modules)
returns false for every authentication method except "Basic" and "Digest":
// Display registered authentication modules.
using System;
using System.Collections;
using System.Net;
class test
{
private static void Main()
{
// The AuthenticationManager calls all authentication modules
sequentially
// until one of them responds with an authorization instance. Show
// the current registered modules.
IEnumerator registeredModules =
AuthenticationManager.RegisteredModules;
Console.WriteLine("\r\nThe following authentication modules are now
registered with the system:");
while(registeredModules.MoveNext())
{
Console.WriteLine("\r \n Module :
{0}",registeredModules.Current);
IAuthenticationModule currentAuthenticationModule =
(IAuthenticationModule)registeredModules.Current;
Console.WriteLine("\t CanPreAuthenticate :
{0}",currentAuthenticationModule.CanPreAuthenticate);
}
}
}
QUESTION:
Does any NTLM authentication-level (i.e. Local Security Policy Setting)
support PreAuthentication or am I stuck with the initial 401 HTTP attempt,
for a non-existent anonymous user, when using only Windows Integrated
Security? I'd really like to lose the initial anonymous authentication
attempt if possible.
Any suggestions would be greatly appreciated!
Jon
- Next message: mrwoopey: "Re: How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted")"
- Previous message: Richard Mueller [MVP]: "Re: How do you figure out the LDAP://? ("Error authenticating. Error authenticating user. The specified domain either does not exist or could not be contacted")"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|