After a my application verifies the username and password, i need to set the Current Profile data. I'm doing it as below :
DataTable UserData = getUserData(UserId);
HttpContext.Current.Profile.SetPropertyValue("FirstName", UserData.Rows[0]["FirstName"].ToString());
HttpContext.Current.Profile.SetPropertyValue("LastName", UserData.Rows[0]["LastName"].ToString());
This displays the error : "Property cannot be set for anonymus users" whenever i try to set a propery for Profile.
I tried to debug and "Watch" the Current Profile data, it is set to "ProfileCommon".
How can I set the Current Profile data ?