Using LogonUser to authenticate a user

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I need the ability to authenticate a user within my application against a specific domain. The machine where the application is running might be part of this domain, another domain or no domain. I am trying to use the LogonUser API which seems to work fine when the machine is part of the target domain, but it does not work when the machine is not part of a domain. The ultimate goal is that once the user authenticates, I impersonate the user and connect to a database using SSPI.

Is there some way that I can achieve this functionality?

Thanks.
 
If you're using C#, check out this article:
http://www.codeproject.com/csharp/cpimpersonation1.asp


Ali Jafry said:
Hi,
I need the ability to authenticate a user within my application against a
specific domain. The machine where the application is running might be part
of this domain, another domain or no domain. I am trying to use the
LogonUser API which seems to work fine when the machine is part of the
target domain, but it does not work when the machine is not part of a
domain. The ultimate goal is that once the user authenticates, I
impersonate the user and connect to a database using SSPI.
 
Back
Top