开发者

Getting User Credentials Windows Authenication

开发者 https://www.devze.com 2022-12-24 18:44 出处:网络
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 thi

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

0

精彩评论

暂无评论...
验证码 换一张
取 消