Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > getting LOGON USER in C#

Reply
Thread Tools

getting LOGON USER in C#

 
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      02-16-2005
To get the logon user i use in VB.NET and it works:=
<%= User.Identity.Name %>
But when i use the same in C# it doesn't work why?
Am i doing something wrong!!!!!!!!!!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Elton Wang
Guest
Posts: n/a
 
      02-17-2005
Do you deny anonymous access? If not User.Identity doen't
work.

Elton Wang

>-----Original Message-----
>To get the logon user i use in VB.NET and it works:=
><%= User.Identity.Name %>
>But when i use the same in C# it doesn't work why?
>Am i doing something wrong!!!!!!!!!!
>
>
>*** Sent via Developersdex http://www.developersdex.com

***
>Don't just participate in USENET...get rewarded for it!
>.
>

 
Reply With Quote
 
 
 
 
Patrick Olurotimi Ige
Guest
Posts: n/a
 
      02-17-2005
Yes i denied that.
So User.Identity.Name doesn't work in C# but in VB it does..
I used request.ServerVariables[LOGON_USER]; and it works for both C# and
VB.NET.
Patrick


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Events: Logon vs Account Logon Jeroen Wijnands MCSA 0 03-06-2006 03:45 PM
Question Help: Logon vs Account Logon, Local Logon vs Authentication CJH Microsoft Certification 0 01-04-2006 04:03 PM
What is best practice: Combining anonymous logon with windows logon? Kjell Kristiansson ASP .Net Security 0 11-30-2005 12:53 PM
Problem: XP Home Logon Names Vanish - Cant Logon Graham Computer Support 0 01-24-2004 11:34 AM
Getting the "choose user" LOGON screen to show up immediately upon booting up Mike M Computer Support 9 10-06-2003 03:46 AM



Advertisments