How to specify IIS Web Application Name in Parameters.xml used with MSDeploy

醉酒当歌 提交于 2020-01-10 08:51:16

问题


I have found out how to set the application pool and default value

<parameter name="applicationPool" defaultValue="MyDefaultValue" >
  <parameterEntry kind="DeploymentObjectAttribute" scope="application"
                  match="application/@applicationPool" />
</parameter>

Does anyone know how to set the "IIS Web Application Name"? It gets generated in the SetParameters.xml file as

<setParameter name="IIS Web Application Name" value="Default Web Site/MySite_deploy" />

I can overwrite the SetParameters.xml file, but I would rather set it up in the Parameters.xml file, but I can't find the parameterEntry type.

Thanks


回答1:


You should be able to override the default value stored in the package by defining a DeployIisAppPath property when you generate the package

Alternatively, you can declare DisableAllVSGeneratedMSDeployParameter=true and Visual Studio will no longer automatically generate any parameters for you, you'll have to declare them all yourself.

If you're declaring the web site parameter yourself, the kind will be ProviderPath. The scope will either be iisApp or contentPath depending on what provider is being used. Tear open a package and look in the archive.xml file, the value will be an immediate child of the root manifest element.



来源:https://stackoverflow.com/questions/14220297/how-to-specify-iis-web-application-name-in-parameters-xml-used-with-msdeploy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!