1

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 ?

user3340627
  • 3,023
  • 6
  • 35
  • 80
  • 1
    possible duplicate of [How to set profile data for new user](http://stackoverflow.com/questions/8893387/how-to-set-profile-data-for-new-user) – mybirthname Dec 28 '14 at 12:16

0 Answers0