By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,969 Members | 1,579 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,969 IT Pros & Developers. It's quick & easy.

User.Identity.Name

P: n/a
Hi,

I am using Forms authentication -in which -
I am trying to use User.Identity.Name, i am getting the user name in this
field even after i logout (i.e, FormaAuthentication.SighnOut(),
and also i am trying to use User.Identity.IsAuthenticated for checking
whether the User has logged in or not.

I don't want to store the user name in Session variable once the User logs
in.

I want to make use of User object properties for getting to know the uswr
name and whether user has logged in or not.

Is this possible?

Thanks
Nedu
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi Nedu,

SignOut method will remove the cookie item related to form authentication,
and this will be effect for next request. For current request ( when you
call SignOut), User.Identity is still valid.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2

P: n/a
Thanks Luke,
I am planning to use User.Identity.Name property for the user name who
logged into my application, is this okay or i have userid captured in the
session variable?
I was trying to use User.Identity.IsAuthenticated for checking session
timeout, but as per your answer it is not so.
I was thinking once the SignOut() method is called then the these
User.Identity properties will be discarded., please clear me in this regard.

"MSFT" <lu******@online.microsoft.com> wrote in message
news:xI**************@cpmsftngxa07.phx.gbl...
Hi Nedu,

SignOut method will remove the cookie item related to form authentication,
and this will be effect for next request. For current request ( when you
call SignOut), User.Identity is still valid.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #3

P: n/a

"Nedu N" <ne****@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP09.phx.gbl...
Thanks Luke,
I am planning to use User.Identity.Name property for the user name who
logged into my application, is this okay or i have userid captured in the
session variable?
I was trying to use User.Identity.IsAuthenticated for checking session
timeout, but as per your answer it is not so.
I was thinking once the SignOut() method is called then the these
User.Identity properties will be discarded., please clear me in this regard.


"MSFT" <lu******@online.microsoft.com> wrote in message
news:xI**************@cpmsftngxa07.phx.gbl...
Hi Nedu,

SignOut method will remove the cookie item related to form authentication, and this will be effect for next request. For current request ( when you
call SignOut), User.Identity is still valid.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 18 '05 #4

P: n/a
Hi Nedu,

User.Identity.IsAuthenticated is also changed on next request. I think a
session variant may be a work around for this problem, you can set User
ID/Name to the session variant after he is authenticated and set it to NULL
after calling SignOut method.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.