Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
38 Points
79 Posts
Apr 26, 2012 09:31 PM|LINK
I use membership provider
after i validate the user using
Membership.ValidateUser(userName, pass)
I use
FormsAuthentication.SetAuthCookie(userName, True)
after if I call a function that has to use the username (its a method of a class)
and there I use
HttpContext.Current.User.Identity.Name returns
to get the name
and i get empty string
why?
(I use it a lot in my project and it works fine, only here, maybe because I just authenticated I have the problem)
thanks
elic05
Member
38 Points
79 Posts
HttpContext.Current.User.Identity.Name returns ""
Apr 26, 2012 09:31 PM|LINK
I use membership provider
after i validate the user using
Membership.ValidateUser(userName, pass)
I use
FormsAuthentication.SetAuthCookie(userName, True)
after if I call a function that has to use the username (its a method of a class)
and there I use
HttpContext.Current.User.Identity.Name returns
to get the name
and i get empty string
why?
(I use it a lot in my project and it works fine, only here, maybe because I just authenticated I have the problem)
thanks