I am trying to come up with a way to deploy ASP.NET code with as little site disturbance as possible. One thought was to set up the site to be served from an NTFS junction c:\www\example.com
where
c:\www\example.com -> c:\www\example.com_r1234
Then, when new code is deployed, it gets copied to c:\www\site.com_r1235
and the junction retargeted to
c:\www\example.com -> c:\www\example.com_r1235
So my question is what affect this might have on current requests in IIS? What other drawbacks might this have from the point of view of IIS's reaction to the change (if any)? Will this be as seamless for the end user of the site as I hope?
(I've considered changing the site's web root through the command line, but I really don't like the idea of reconfiguring IIS because of any unnecessary app domain or app pool churn that might happen, but I don't know a lot about what happens when the configured physical path of a site is changed while under load)
To be clear, my only concern here is the experience of my end users. My aim is to avoid disturbances for them, not convenience for me.
It seems like this objective and your proposed solution are not aligned, because you now have a bunch of extra work or scripts involved for every deployment.
One thing I have seen is to install an svn client on the production server, and the production site is a checked-out copy of a specific location/branch on the source control tree. This way at least you only have to update changed files for new deployments.
I created a folder behind my web root called
_images
then copied a bunch of gif files into it. I then created an NTFS symbolic link on my root using
In Visual studio 2010 I "Show All Files" then refresh... and include the new "webimages" into my project. I can now point to...
When I run the app it works fine too on my local machine.
I wont know if it works on the real server (IIS 7) until infrastructure gets a handle on this, does anyone know any issues on why this wouldn't work in production??
I feel as long as the rights are there it should, and if so what a great way to simplify sharing folders (of all types) between web apps.
I have not tried to express this in TFS yet, so if anyone has feedback on this let us know!
This won't work because IIS may think the web.config has changed by another program. IIS will probably throw a System.Configuration.ConfigurationErrorsException exception. I would suggest writing some sort of script to just change the home directory of the site.