asp.net - Two instances of the same Website on IIS with different web.config (two different databases) -
i want implement kind of configuration of same website (www.example.com) on iis want have 2 instances 2 application pools 1 instance located at:
c:\site1
and second 1 located at
c:\site2
both sites 100% equal exception of database connection string, each 1 pointing different database server.
so in dns pointing www.example.com , on iis each instance point www.example.com.
i'm doing way because need restore database daily new information in current scenario have stop application, restore database , restart application website goes offline every time this.
so thinking way can stop site1 restore database restart site , same site2
rather duplicate websites, can have 2 databases e.g. db1 , db2.
if db1 active (configured in web.config), restore db2. then, update web.config point db2. active requests complete using old configuration (pointing db1), new requests use new configuration (pointing db2).
update
based on heavy startup cost, can instead create 2 websites www1.example.com , www2.example.com, , setup third site www.example.com redirects either www1 or www2 depending on 1 ready. can configure redirection within iis, no need html or asp.net page accomplish redirect.
Comments
Post a Comment