Click here to Skip to main content
15,884,237 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,


I have a requirement like, developed an ASP.net web application. I want to host this application for different companies with seperate database, but website shall be hosted only one copy in IIS. so, based on user login, the application should connect different database server.

A user can access to the application according to its credentials: user, pwd and company. The issue is that if the user enters since Mexico, it has the enviroment from Mexico but if a users enters from Brazil, both enviroments are from Brazil and viceversa.

How can i do if there are many users working simultaneously but
each one must access to the database and enviroment only from its country

Thank you!
Posted

1 solution

You can use the globalization in ASP.NET web application of yours, or a simple method would be to use the UserID of the logged in user and show him the data that he has to see.

Connecting to different database won't be a good idea (until your application is of enterprise level of sophistication). You can create different tables for the users from different locale and show the data to each user depending on the locale the user belongs to.

Multiple users are handled by your web server (hopefully, which will be IIS) and thus you do not have to worry about that feature, all you need to take care of is the way of representing the data to the user.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900