Hi..
Can Anybody Please Tell me that how can i set value for User.Identity.Name..while login and how can i access that value using HttpActionContext...I am using Custom Authorize Attribute....but i am not getting the value that user is Authorized or not...so
how can i set value to User.Identity while login..
what i did:--
1]i checked for user name and password with database.
2]if user is present with provided username and password then i have issued FormsAuthentication.SetAuthCookie(userData.ID.ToString(),true);
FormsAuthentication.SetAuthCookie(userData.ID.ToString(),true);
userSessionDetail.RoleId = 1;//need To change
userSessionDetail.CreatedOn = DateTime.Now;
userSessionDetail.UserId = Convert.ToInt32(userData.ID);
userSessionDetail. ...
Go to the complete details ...