Note that there are some explanatory texts on larger screens.

plurals
  1. POStoring additional data in aspnet_profile table with Membership data
    primarykey
    data
    text
    <p>I am using Membership API with OpenId implementation in my project built on MVC2 framework. Other than the username , I need some other fields to be associated with the user at the time of registration.</p> <p>I am not sure though but I think Profile system in asp.net is built for this type of requirement. Also, I see a table with other membership tables named 'aspnet_profile'. </p> <p>I added following settings in the application web.config to enable the profile :</p> <pre><code>&lt;profile enabled="true"&gt; &lt;properties&gt; &lt;add name="FullName" allowAnonymous="false"/&gt; &lt;/properties&gt; &lt;/profile&gt; </code></pre> <p>As said before, application need some additional data to be associated with the user, so when creating a user using Membership API, I added few more lines of code for making entry into profile table</p> <pre><code>System.Web.Security.MembershipCreateStatus status = MembershipService.CreateUser(userModel.UserName, userModel.Password, userModel.UserName); if (status == System.Web.Security.MembershipCreateStatus.Success) { FormsService.SignIn(userModel.UserName, true); Session["Username"] = userModel.UserName; dynamic profile = ProfileBase.Create(MembershipService.GetUser(userModel.UserName).UserName); profile.FullName = userModel.UserFullName; profile.Save(); RedirectToAction("Tech", "Home"); } </code></pre> <p>But I don't see any line added in the aspnet_profile table in the database. Also, I wanted to ask if this is the preferred way of adding additional data along with default membership data</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload