Re: how do you get current username in aspx?
From: Flip (!REMOVE_ME!phenry_w_at_hotmail.com)
Date: 01/29/05
- Next message: Vagif Abilov: "Re: NameValueCollection's GetValues does not return multiple entries"
- Previous message: Matt Berther: "Re: NameValueCollection's GetValues does not return multiple entries"
- In reply to: Flip: "how do you get current username in aspx?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 29 Jan 2005 13:34:35 -0500
Howdy. I tried the following lines and to my astonishment, nothing is
printed in the Trace for the username. What is happening here?
Trace.Write("username='" + HttpContext.Current.User.Identity.Name.ToString()
+"'");
Trace.Write("usertostring=" + HttpContext.Current.User.ToString());
Trace.Write("type=" + HttpContext.Current.User.GetType().FullName);
THis gives this in the trace output.
username='' 0.003853 0.003408
usertostring=System.Security.Principal.WindowsPrincipal 0.004247
0.000394
type=System.Security.Principal.WindowsPrincipal
- Next message: Vagif Abilov: "Re: NameValueCollection's GetValues does not return multiple entries"
- Previous message: Matt Berther: "Re: NameValueCollection's GetValues does not return multiple entries"
- In reply to: Flip: "how do you get current username in aspx?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|