I don't know whether this question belong here, but...
In the past I had many customers using the same website each with their own domain name and their own database. To accomplish that, I used MS Access and placed each customers database in separate directories. I steered the customer to the correct directory using their domain name. I am now trying to accomplish the same thing using aspnetdb.mdf and other .mdf database files. I am using the aspnetdb.mdf database for membership, etc. I want the aspnetdb.mdf database file to be unique for each customer. Does anyone know how to accomplish what I was doing with MS Access using aspnetdb.mdf? Is there any way to have multiple web.config files each of which would be dedicated to a particular customer?
I am not sure if you can keep the same website, but the obvious way is to create duplicated websites & for each one you set (in web.config) a different configuration database. something like:
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=localhost;Initial Catalog=aspnetdb1;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
where you have createdaspnetdb1before and configured it usingaspnet_regsql.exe
No comments:
Post a Comment