Hi Folks,
I've been thinkig about making my web application useable by multiple companies by giving them different databases. This means, upon their logon I find out which client they belong to (based on a third credential: companyCode (Login, Pass, companyCode) and put the related connectionstring in the Session.
In the global.asax is do this:
protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
{
if(Session["cstr"]!=null)
{
XYZ.HelperClasses.DbUtils.ActualConnectionString = (string)Session["cstr"];
}
}
Now I would like to know if it is possbile that when 2 users connect for 2 companies at the same time the connectionstring get mixed up, so they will see the wrong data.
Also, if someone can advise me if this is a smart approach anyway, please do so. The situation is: 1 set of code files and 1 SQL Server with a database per client. Based on connectionstring the application presents the data.
Thank you!
Greets,
Gab****