Re: how do you get current username in aspx?
From: Paul Clement (UseAdddressAtEndofMessage_at_swspectrum.com)
Date: 01/31/05
- Next message: Vagif Abilov: "Re: NameValueCollection's GetValues does not return multiple entries"
- Previous message: ATS: "RE: HOWTO Build a C# app to MSIL/CIL?"
- Next in thread: Flip: "Re: how do you get current username in aspx?"
- Reply: Flip: "Re: how do you get current username in aspx?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 Jan 2005 08:34:09 -0600
On Sat, 29 Jan 2005 13:34:35 -0500, "Flip" <!REMOVE_ME!phenry_w@hotmail.com> wrote:
¤ 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
¤
¤
That doesn't look like valid syntax to me. Are you trying to retrieve the first and last name of the
user?
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
- Next message: Vagif Abilov: "Re: NameValueCollection's GetValues does not return multiple entries"
- Previous message: ATS: "RE: HOWTO Build a C# app to MSIL/CIL?"
- Next in thread: Flip: "Re: how do you get current username in aspx?"
- Reply: Flip: "Re: how do you get current username in aspx?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|