Configuring Multiple ASP.NET MVC Sites To Use a Single Database For Authentication/Membership


Is it possible for two or more ASP.NET MVC sites to use a single SQL Server database for authentication and other things?

Here's how I'm thinking of setting it up: I will combine the current database of each site into one single database, prefixing the tables with the name of the site they belong to. I currently have authentication tables generated by the asp.net_regsql.exe utility. How should I combine those tables? I'm guessing that the way to do it is to somehow set the "application_id" column in those tables...

Thanks in advance.


The membership/role/profile/session providers usually have an option to include an "ApplicationName" This applicationname will be used to filter out the membership/role/profile/session queries. You can set this applicationname in the web.config like this:

By : SztupY

This video can help you solving your question :)
By: admin