Author: JGriffiths | Posted on: 3/26/2009 3:55:21 AM | Views : 1287

Hi
We are developing a web application that we will host for multiple customers, each with their own separate database.  The application uses Role Based security (System.Web.Security.Roles) and stored the information in a SQL Server database.
The idea is that we would implement this in one of two ways.
The first is that we would have a SINGLE web site with multiple host headers (URLs).
The second is that we would have MULTIPLE web sites, each with their own host header (URL).
The idea is that this website (websites) would call the same set of code (BIN).
What we would therefore need to do in the ASP.NET code is to identify which database to use based upon the HOST HEADER being used.
I've done something similar to this before where we were NOT using Roles but our own application-based security - the application's Master Page's INIT event set up the correct connection string to use.  However, I can't see how to do thi ...

Go to the complete details ...