I proberbly having a silly five minutes but I how do I authicate using Windows Username and password with the user entering the ursername and password into a web form?
Kind Regards
Regards
Thomas Park
Programming in ASPX and C# build Application on Microsoft .NET Framework 4.0 for Small Business and Education
tparky
Member
112 Points
128 Posts
ASP.NET Form Based Authciation using Windows Username
Jan 20, 2013 07:00 PM|LINK
Hi Guys,
I proberbly having a silly five minutes but I how do I authicate using Windows Username and password with the user entering the ursername and password into a web form?
Kind Regards
Thomas Park
Programming in ASPX and C# build Application on Microsoft .NET Framework 4.0 for Small Business and Education
dahla
Participant
1816 Points
369 Posts
Re: ASP.NET Form Based Authciation using Windows Username
Jan 20, 2013 08:57 PM|LINK
C# in .NET 3.5 using System.DirectoryServices.AccountManagement.
bool valid = false; using (PrincipalContext context = new PrincipalContext(ContextType.Domain)) { valid = context.ValidateCredentials( username, password ); }taken from http://stackoverflow.com/questions/326818/how-to-validate-domain-credentials
Boracay
Member
142 Points
165 Posts
Re: ASP.NET Form Based Authciation using Windows Username
Jan 21, 2013 01:41 AM|LINK
if you have some roles associate with windows username then creating another DB Table makes more sense.
once user login the windows machine and get the user name and find the role from the table.