Steven, I take it you ran the aspnet_regsql.exe
command line tool to add these database objects? Alternatively, you can add just the necessary tables/views/stored procedures for different parts of Membership by running the applicable SQL scripts, which you'll find in the %WINDIR%\Microsoft.Net\Framework\version
folder (where version is the .NET version you are using, like v4.0.30319).
There you'll find files named InstallCommon.sql
, InstallMembership.sql
, InstallRoles.sql
, InstallProfile.sql
, InstallSqlState.sql
, and so on. You'll need to run InstallCommon.sql
and then just those other files you need. So if you need just Membership and Roles, you'd run InstallCommon.sql
, InstallMembership.sql
, and InstallRoles.sql
. In this way your database would not include the tables/views/sprocs for profile, SQL state, and so on.
All that being said, I'd just leave in all of the database objects that ASP.NET added. It's probably more work than it's worth to add just the subset of interest and, who knows, you may need to implement profile or Health Monitoring later so why not have these other database objects in place and
ready to go.
And to answer your first question - No, there is no way to change the table name from aspnet_Users
to Employees
. However, it's not uncommon to create your own table (perhaps called Employees
) that stores information about an employee. This table, then, would have a foreign key back to aspnet_Users
that links an employee to a particular login account. See Storing Additional User Information for a look at how this can be accomplished.
Happy Programming!