Using Windows Log in for my App Log in

owinterton

Member
Joined
Mar 18, 2003
Messages
12
Location
California
Since my app is going to live on a Windows 2000 SQL Server, I am trying to use the windows username and password for my app. How do I go about using the log in or accessing the username and password for the current user? I have found VB6 code but it doesnt work in my app for .NET. Any suggestions?
 
Well, seeing that windows already took care of the authentication by checking your password, I suggest you leave the password and only use the username. You can get the user that created your app thread with the Environment.UserName property.

Hope it helps...
 
Originally posted by Nerseus
If you need the domain and username, use:
System.Security.Principal.WindowsIdentity.GetCurrent().Name

-Ner
this is what ive been searching high and low for.. ;)
 
Back
Top