Getting User Credentials Windows Authenication
If a user has signed into their computer and are connected to an intranet, is there a way to grab the users crendtials and authenticatio开发者_如何学Cn them in asp.net? What specific code would do this?
Yes it's very possible. See "Configuration Windows Authentication" section in this article:
http://msdn.microsoft.com/en-us/library/ms998358.aspx
Essentially you allow IIS and ASP.NET to digest the windows user information.
You can use System.Web.HttpContext.Current.User.Identity
精彩评论