I'm building an application for our client base, all of whom have pre-existing database's. The business owners will be able to read and report on their local business DB's through this app, all data will be specific to their business.
I'm planning on doing the following:
- Create "master" account database to store info about all our clients accounts
- Upload existing databases to our server solution
- On login, check against account db and load appropriate db to persist through client sessions
My question is, is it best to put every data connection in as a new entry in web.config and just reference the connstrings throughout the app off a session variable ie:
- Client A Login -> Uses Database A -> Store DB_A_Connstring as session var
- Client B Login -> Uses Database B -> Store DB_B_Connstring as session var
Or is there a better approach? Thanks for the input.
EDIT: I'll note that each db will have a GUID and I'll be constantly validating the connection against account credentials so I'm not too concerned about the security of this approach, just it's implementation as a viable option.