SqlProfileProvider p = (SqlProfileProvider)this.Context.Profile.Providers["SqlProvider"]; SettingsContext settingsContext = new SettingsContext(); settingsContext.Add("UserName", userName); settingsContext.Add("IsAuthenticated", true); SettingsPropertyValueCollection pvalues = p.GetPropertyValues(settingsContext, ProfileBase.Properties); pvalues["RealName"].PropertyValue = realName; p.SetPropertyValues(settingsContext, pvalues);