Windows forms security using logonuser API

G

Guest

Hi,
I am using vb.net application and i want to authenticate users based on
LOGONUSER API. This API is working in XP machines and not working in win 2000
macines.
What might be the problem ?
Any ideas?

Regards,
Bala
 
M

Mattias Sjögren

What might be the problem ?

Like the documentation says, on Win 2000 the process needs the
SE_TCB_NAME ("Act as part of the operating system") privilege for the
function to succeed. That privilege is usually only granted to the
local system account.



Mattias
 
H

Herfried K. Wagner [MVP]

Balakrishnan M.v said:
I am using vb.net application and i want to authenticate users based on
LOGONUSER API. This API is working in XP machines and not working in win
2000
macines.
What might be the problem ?

In addition to Mattias' reply: What does your function declaration look
like?

\\\
Private Declare Auto Function LogonUser Lib "advapi.dll" ( _
ByVal lpszUsername As String, _
ByVal lpszDomain As String, _
ByVal lpszPassword As String, _
ByVal dwLogonType As Int32, _
ByVal dwLogonProvider As Int32, _
ByRef phToken As IntPtr _
) As Boolean
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top