Bonjour,
Je crois que tout est dans le titre! Je cherche à récupérer le nom d'utilisateur passé automatiquement via Integrated authentication.
Merci pour vos lumières!
Bonjour,
Je crois que tout est dans le titre! Je cherche à récupérer le nom d'utilisateur passé automatiquement via Integrated authentication.
Merci pour vos lumières!
trois solution pour toi
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 1) System.Security.Principal.WindowsPrincipal p = System.Threading.Thread.CurrentPrincipal as System.Security.Principal.WindowsPrincipal; string strName = p.Identity.Name; 2) string strName = HttpContext.Current.User.Identity.Name.ToString(); 3) string strName = Request.ServerVariables["AUTH_USER"]; //Finding with name string strName = Request.ServerVariables[5]; //Finding with index
Merci CodeProject
http://www.codeproject.com/KB/aspnet...User_Name.aspx
Partager