How about mapping USER/Client login with a DB Mapping?
When the user logs in, they use a "Standard Login ID" to connect to a
"ADMINDB", from this "Admin DB" you get the DB name (for that user)
they are supposed to use starting then, you can then stored this DB
name as part of session variable
Also ensure you give bare minimum permission to this "Standard Login
ID" for that User<---->DB mapping table.
Griff wrote:
On a related note....
I am writing a web application that I intend to host for several clients.
The idea is that I will have one folder containing all the code and a
separate web site for each client all using the same physical folder as the
home directory.
Each client will have their own SQL Server database and the idea is that
I'll know which DB to connect to based upon the Request.ApplicationPath
value.
What I'm not sure about is how to use the web.config file to contain
information that is web-site specific, e.g. if Client = A, use DB = A, if
client = B, use DB = B etc.
Is web.config where I should be storing this sort of information?
Griff