As the name implies, I would like to create a single website in IIS that creates several instances of the ASP.net application based on the requested site.
So, all instances work with the same code base, but each instance has its own application object, a collection of sessions, etc.
For instance:
host1.domain.tld / default.aspx -> this.Application ["foo"] = "host1"
host2.domain.tld / default.aspx -> this.Application ["foo"] = "host2"
host3.domain.tld / default.aspx -> this.Application ["foo"] = "host3"
I know that I can configure IIS to listen on a specific IP address and set the DNS for the host (1 | 2 | 3) .domain.tld to point to that IP address. Then use Global.asax to check the required host to configure specific host settings. But the application will still work as a single instance on the server.
I would prefer to have multiple instances of the application running for each host so that their execution time is completely shared, it would be nice if I could also have them in separate application pools, but this is not so important
Of course, I could add sites in IIS to the servers, but there are 1600 instances that will need to be configured, and this will be very time-consuming and difficult to manage.
The ability to configure individual instances on multiple servers, then manage load balancing through the DNS configuration or filter on firewalls that can be easily controlled programmatically.
FYI — Asp.net 4.0 is used and IIS runs on Windows Server 2008.
Any suggestions would be great.
Thank you very much
source share