Dave, The user _should_ explicitly specify her domain as a part of Windows authentication process, because it may not necessarily be that of the host. One _could_ dynamically retrieve the logon credentials using Win32 API or Active Directory API, assuming this is the set of credentials user wants to be authenticating with, but that would imply the use of platform dependent code in your application
Oleg On Thu, 2005-01-20 at 14:27 -0500, Dave Seidel wrote: > So what I'm really trying to figure out is what value to use for the domain > name when constructing an instance of NTCredentials. I'd been using the > client's hostname. This works on our LAN, which has no domain controller > and just uses a workgroup. But I'm guessing that in an environment with a > domain controller, I need to use the real domain name. Is that correct? > And if so, is %USERDOMAIN% a valid way to get that name? > > - Dave > > -----Original Message----- > From: Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 20, 2005 2:10 PM > To: HttpClient Project > Subject: Re: NTLM help -- how to get domain? > > > > I guess a machine can be in more than one domain. > > Not really. A host can be member of one domain only, but the domain in > question may trust (and be trusted by) other domains, in which case the > domain controller delegates authentication to a domain controller of the > trusted domain > > Sorry for being pedantic. I used to be an MCSD in pre .NET times ;-) > > Evil Comrade Oleg > > > > You must provide the > > domain you are authenticating against (which is not necessarily the same > > as the machine is in). I see the domain name as a name space, in which a > > set of credentials is valid. I don't know of a way to retrieve the NT > > domains of a machine. Maybe ask MS. > > > > Ortwin Glück > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]