This might sound like a very dumb question, so let me first say what I want to achieve and then proceed to my question on how I'd envision something like this working.
I am trying to achieve completely seamless deploys of our web application to IIS (without interrupting users or active connections).
The way I envision this working is to have two root virtual directories sharing the same site. By root virtual directory I mean the one that IIS creates internally and assigns it to the root of each site or web application; except here I want to have two such root vdirs (each bound to their own app pool, but both referencing the exact same application from different folders). During normal operation, one of the vdirs would be inactive.
When doing a deployment, I would put the new code into another folder referenced by the second (inactive) vdir, and then mark it as active. What I want to accomplish is to then have IIS begin sending all new connections (requesting the same site) to that second vdir with the new code, but keeping the old one also alive & active until all remaining connections to it are dead (some, such as file uploads, could be long running). Once all of the lingering connections are dead, the old vdir/app pool becomes inactive and the second one with the new code becomes the only active one.
I hope this makes sense.
If it does not, here is my alternative attempt at explaining it with an example.
--- Web Site ("mysite.com")
--- Root VDir#1 (IIS Internal, App Pool: AppPool#1, Virtual Path: /, Physical Path: C:\inetpub\MySite.v1084\). ACTIVE
--- Root VDir#2 (IIS Internal, App Pool: AppPool#2, Virtual Path: /, Physical Path: NONE). INACTIVE
During a deployment, Root VDir#2 would become active and its Physical Path would change to C:\inetpub\MySite.v1085. That would be the default vdir IIS would serve for all new connections. Once all active sessions/connections to Root VDir#1 die, that becomes inactive.
Is something like this possible? Are there alternative ways of doing something like this (I know there is some form of built-in load balancing in IIS ("Web Farms"?) but am not too familiar with it).