I have a web application project in VS2012 that I publish using the Web Deployment Package. I want this package to include application settings, in particular, create an IIS application pool and assign it a newly created application.
I am familiar with the “Enable application pool settings used by this web project” option, available when the project is configured to use an IIS instance (not IIS Express), but the IIS configuration is not part of the project file and therefore is not controlled by the source. What happens when someone creates a deployment package on a machine on which IIS has not been carefully configured? Not ideal.
How then can I get AppPool settings in my web deployment package? I understand that the appPoolConfig provider is only IIS7 +, I am fine with this restriction. In the past, I hit my head about this problem and did not find a solution. After 18 months, we have a new version of VisualStudio and a new web publishing pipeline, are there any new solutions to this problem? Or maybe I missed something when I first addressed this problem?
Edit
OK, I see the following options:
- Configure my project to synchronize with the IIS instance. As already mentioned, I'm not a fan of this, given that it sets the settings outside the project, that is, the environment must be carefully configured to build + publish. In addition, it navigates through other IIS settings that I do not want to enable.
- Add something to the web publishing pipeline (WPP) to modify the archive.xml file. I have played with this in the past and have had limited success. One of the problems is that the pipeline is not completely compatible with working directly with the archive.xml file, another problem is some of the most cryptic attributes, like
MSDeploy.MSDeployProviderOptions , which seems to have Base64 encoded binary? I don’t know what to add there. - Find an existing “provider” that can do what I want. I might be out of luck, the
appPoolConfig provider seems to want to read / write IIS, and not, say, an XML configuration file. Does anyone know otherwise? - Write my own “provider” for creating the output manifest. I'm not sure if it is possible to write a custom provider that writes to the manifest using the name of an existing provider? Like in,
MyCustomPoolProvider writes appPoolConfig sections to the manifest? This sounds like a potentially painful exercise that may or may not work. Should I still determine the encoding of what is happening in MSDeploy.MSDeployProviderOptions ?
I get the feeling that the main obstacle with using Web Deploy for what I'm trying to accomplish is how strictly it relies on "providers." Existing providers are primarily designed to synchronize IIS, not primary development and publishing. It so happened that some of these providers can be easily connected via MSBuild, but most insist on pulling data from IIS and what it is.
source share