Using the MySQLProfileProvider

The ASP.NET MembershipProvider is also available for the MySQL database.

The Membership Provider doesn’t come with much fields for profile information, like firstname and surname. A shortcut to implement the name would be to use the “Comment” field instead. If you don’t use the comments off course.

An other way to expand the profile of a user is to use the MySQLProfileProvider. You just add the extra columns in the web config.

<profile enabled="true" defaultProvider="MySQLProfileProvider" inherits="UserProfile">
        <clear />
        <add name="MySQLProfileProvider"
             type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
             autogenerateschema="True" />
        <add name="firstname" />
        <add name="surname" />

This solution doesn’t work with an Empty Web Application, only with website projects in Visual Studio.

An example to extend the user profile with an Empty Web Application can be found on Jon Galloway’s blog and here.