c# and domain authentication

  • Thread starter Thread starter Ivan Sammut
  • Start date Start date
I

Ivan Sammut

Is it possible thru c# to create a login screen which authenticates with a
windows servers using normal windows login instead of having to create a
different set of tables and passwords for my users.
 
Ivan,

Yes, it is. Assuming you have connectivity, you would impersonate the
user you want to login as (see the documentation for the Impersonate method
on the WindowsIdentity class for an example of how to do this) and then call
the appropriate APIs which you would use to access the resource that you
want to access (file, database, etc, etc).
 
Hi,

Yes, check the archives in how to do a login screen. You can use
Thread.CurrentPrincipal to know who is logged in.
 
Back
Top