|
-
Sep 7th, 2007, 02:39 PM
#1
Thread Starter
Lively Member
User.Identity.Name and Forms Authentication
I noticed that if you are using Forms Authentication then you can't pull the User.Identity.Name. It is empty. In our applications we need to use Forms Auth. but still at times I need to retrieve the user and the error when they can't sign in.
Is there a way to pull the User's Name from their computer even though I am using Forms Authentication in the Web Config file?
Thanks.
-
Sep 8th, 2007, 02:17 AM
#2
Re: User.Identity.Name and Forms Authentication
In short no, if they have not logged in user.identity has not even been created. You could set a perminant cookie when they do login and see if it's there on a future failed attempt, either the formsAuth cookie or a generic one.
-
Sep 8th, 2007, 11:00 AM
#3
Re: User.Identity.Name and Forms Authentication
It's logical, isn't it? If they can't sign in, you won't have a User.Identity.Name. 
When their attempt to login fails though, they will have entered their username+password in textboxes at some point. You have that information. Use that information to log the exception.
-
Sep 26th, 2007, 11:31 AM
#4
Thread Starter
Lively Member
Re: User.Identity.Name and Forms Authentication
Ok. Thanks. I was afraid of that. I won't worry about it. The login page is a stand alone website that I don't have access to.
-
Sep 28th, 2007, 08:04 AM
#5
Re: User.Identity.Name and Forms Authentication
Sounds good, add [Resolved] now? Unless you have more questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|