Click here to Skip to main content
15,886,788 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all

I have 10 websites instances of one website. I want to load each website instance with unique name and different connection strings in web.config.

Regards.
Posted
Comments
sameer549 5-Aug-14 3:20am    
I think there is no other way, you have to implement this in your code logic. At runtime you have to when application starts, store the connectionString as it is in Use, and you have to release the connectionString when application terminates.
Tayseer Nasassra 5-Aug-14 4:01am    
In your case, if different users of different websites(instances) try to access at the same time, then what will happen? Web.Config will be updated with each access. Concurrent access will cause large delay time or even errors.

What do you think?
sameer549 5-Aug-14 5:00am    
I dont think there will be a need of different connections. do u want to use different connectionStrings/same connectionstring with different connections ?
Sergey Alexandrovich Kryukov 5-Aug-14 3:31am    
What do you mean by "web site instances"? Why different connection? Connection is not an attribute of a Web site. What did you mean by that?
—SA

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