How to get user details in asp.net Windows Authentication

后端 未结 3 1264
既然无缘
既然无缘 2020-12-28 11:03

I am using windows Authentication and accessing user name as.

IIdentity winId = HttpContext.Current.User.Identity;
string name = winId.Name;
<
3条回答
  •  长情又很酷
    2020-12-28 11:07

    You can define a MyCustomIdentity by overriding from IIdentity and add your own properties etc.

提交回复
热议问题