Continuous deployment of IIS settings with MSDeplo

2019-04-09 07:39发布

We practice continuous deployment with TFS (2008) and are looking for a nice way to handle IIS settings changes. MSDeploy seems like it should be the way to handle this, but after much reading and searching, I haven't found a good answer.

The problem with MSDeploy, as I see it, is that you need to create a deployment package using an existing IIS website. I would like to be able to have the appropriate IIS configuration for the website in source control and have the build create the package.

The only way I can see to do this is to hand craft the archive.xml file. Is my thinking correct or is there a better way?

2条回答
甜甜的少女心
2楼-- · 2019-04-09 08:14

I've been able to put a bunch of the website settings into my web.config so that they are in source control and easily deploy-able. Not all though. Some seem to get set higher up in the IIS hierarchy and then cannot be overridden by my web.config.

I've never found a way to do this with application pool settings.

For setting up new sites I wrote a small C# WinForms app that uses the programmatic interface to IIS to create the sites and app pools and change their settings. Probably similar to your PowerShell script.

查看更多
The star\"
3楼-- · 2019-04-09 08:15

I ended up using powershell web administration module (with PSake for the build) to do this. I would still prefer to do this in a declarative manner.

查看更多
登录 后发表回答