Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Application Pool with MSDeploy

I'm currently using MSBuild to create an MSDeploy package by passing in arguments:

/p:DeployOnBuild=true;DeployTarget=Package

I'm using a parameters.xml file (placed at the root of my website). Another SO question I found tries to set up the application pool.

My parameters.xml file:

<parameters>
    <parameter name="Application Pool Name" description="Application Pool for this site" tags="" defaultValue="ASP.NET v4.0">
        <parameterEntry kind="DeploymentObjectAttribute"
                        scope="application"
                        match="/application/@applicationPool" />
    </parameter>
...
</parameters>

but it seems that the archive.xml file inside the msdeploy package generated by the msbuild doesn't have an section with an applicationPool element

How can I get the archive.xml to be generated with this section so that I can set the application pool?

The app pool I want to set will exist already, so I'm not concerned with MSDeploy synching or creating app pools here.

Edit: I have found this question How do I control the AppPool used for deploy through VS & MSDeploy settings which hints at using wpp.targets to generate a custom provider. I'm exploring how to use this approach to modify the archive.xml file

like image 375
EdmundYeung99 Avatar asked Nov 27 '12 22:11

EdmundYeung99


People also ask

How do I configure Web management services?

To configure the Web Management ServiceOn the Start menu, point to Administrative Tools, and then click Internet Information Services (IIS) Manager. In IIS Manager, in the Connections pane, click the server node (for example, STAGEWEB1).

How do I deploy a website using IIS?

In IIS, right-click the Default Web Site, choose Deploy > Configure Web Deploy Publishing. If you don't see the Deploy menu, see the preceding section to verify that Web Deploy is running. In the Configure Web Deploy Publishing dialog box, examine the settings. Click Setup.

Where is MSDeploy EXE?

Go to C:\Windows\System32 and right click on CMD. EXE. Choose “Run as Administrator”. Once the command prompt is up, you will navigate to the folder level where MSDeploy.exe exists.


1 Answers

Assuming you have the correct IIS settings on your project and are running as Administrator, you should be able to specify IncludeIisSettings=true to have the settings included in the zip.

If you need the actual AppPool definition included (so it can be created), you should also set IncludeAppPool=true.

like image 118
Richard Szalay Avatar answered Jan 11 '23 07:01

Richard Szalay