61 reputation
4
bio website
location
age
visits member for 1 year, 8 months
seen Jul 9 at 12:53

Dec
8
awarded  Benefactor
Dec
6
comment IIS 7: launch unique site instance per host name
The code is identical for every site, and so are all of the IIS settings, but the behaviour of the code at runtime is governed by settings which are in turn governed by the host name. For instance, the DB connection string is a setting which is configured differently for different host names. There are various legacy design decisions (static classes etc.) that would make it difficult to have these different configurations co-exist in one instance. Thanks for the offer, but the last 3 paragraphs are certainly detailed enough for me.
Dec
4
comment IIS 7: launch unique site instance per host name
The last 3 paragraphs are a useful and detailed explanation of how I could set up what I was asking about by doing some programming, which it looks like I'd have to. I think I have to give the answer to Peter Hahndorf though because he was the first to answer the question asked and he did suggest this albeit in less detail.
Dec
4
comment IIS 7: launch unique site instance per host name
I think your point about URL Rewrite was based on the assumption about using website name as config key?
Dec
4
comment IIS 7: launch unique site instance per host name
Hi, thanks for the detail. I'll try to respond to each point in turn. First I did actually mean 'host name'. The application picks this up from the first request and uses it as a key to load its config. The goal is to have one running instance per host name, but every instance is identical from the perspective of IIS.
Dec
3
comment IIS 7: launch unique site instance per host name
Just personal preference but I think if I do have to create the site myself I'd probably go the managed API route. I can see this would be useful for some though.
Dec
2
comment IIS 7: launch unique site instance per host name
Thanks, I'm probably going to end up accepting this as the answer as it is kind of what I suspected, I'm just going to wait a day or so and see if anybody else has anything to offer. Meanwhile - your idea about dynamically scripting the site creation sounds like it might have legs. The default site could handle unbound host names and, if appropriate, create a new site during the request. Then it could return a response that in some way caused the browser to refresh immediately. Thanks!
Dec
2
awarded  Supporter
Dec
2
comment IIS 7: launch unique site instance per host name
Hi, thanks for the question. The idea isn't to copy the actual files, only the IIS site definition. All the dynamically created sites would have the same home directory and would differ only by the host name being used.
Dec
1
awarded  Promoter
Nov
26
awarded  Student
Nov
26
asked IIS 7: launch unique site instance per host name