win form security

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

Guest

I would like to authenticate to windows via a login creen in my application.
when i do a search I get stuff but on asp. This is not for asp.net I just
what a login screen for win form applications that will check the username
and password entered in a login screen against windows local or on a server.
 
freddy,

Basically, you are going to have to call the LogonUser or LogonUserEx
function in the API through the P/Invoke layer. It will validate the user
and the password. You can also impersonate the user logged in (which you
should, for certain permissions) by using the WindowsIdentity class (check
the documnetation for the Impersonate method on the WindowsIdentity class to
see how).

Hope this helps.
 

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

Back
Top