Deploy a net6 mvc web app on iis using webdeploy package

Viewed 53

I created a web delpoyment package using the "Web Deploy Package" wizard from Visual Studio 2022.

The output is a web package and a cmd file to configure.

My goal is to install the package on a remote server as new application with a custom new application pool. A default web site already exists.

I got this working using parameterization

webpackage-deploy.cmd /Y /M:iis-machinename /U:user_name /P:user_password

The issue is i always get the default application pool.

What i have already tried was to add

<IncludeAppPool>true</IncludeAppPool>
<IncludeIisSettings>true</IncludeIisSettings>

to the pubxml publish file. This lead to a custom parameter, which gets ignored when i install.

-enableLink:AppPoolExtension

which also made no difference.

Looking inside the webpackage in archive.xml the deployment is alsways a IISAPP. As much as my resarch went the IISAPP can not assign a application pool.

I also found the apphostconfig provider, which in my case didn't work because i have to specify more parameter, e.g. the physical path which i do not want to configure while installing (the IISAPP uses the inetpub/wwwroot folder which is what i want to achieve )

0 Answers
Related