c# and domain authentication

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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).
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

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

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