I have a .net 4.8 api which is getting deployed in IIS (azure vm). The vm is domain joined and the app pool is using application pool identity.
When I deploy it, post that I am unable to browse the api swagger.
Here are some details:
I manually create a port 80 binding but cannot browse the api created under the site
VM is domain joined
App pool identity used
If I set physical path in Basic Settings for site I get an error: "The specified user name does not exist"
Tasks IISWebAppManagementOnMachineGroup@0 and IISWebAppDeploymentOnMachineGroup@0 used for deployment in release pipeline.
Edit 1: Yaml
//params and variables defined while calling stage
baseUrl: mysite.com
RootPath: 'D:\myapp\${{ parameters.baseUrl }}'
VirtualApiPath: '/API'
Workspace: '$(Pipeline.Workspace)/'
PackageName: '/drop/xxx/MyAPI.zip'
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'Manage Web Application'
inputs:
IISDeploymentType: IISWebsite
ActionIISWebsite: 'CreateOrUpdateWebsite'
WebsiteName: '${{ parameters.baseUrl }}'
WebsitePhysicalPath: '${{ parameters.RootPath }}'
CreateOrUpdateAppPoolForWebsite: true
AppPoolNameForWebsite: 'MyAppPool'
PipeLineModeForWebsite: 'Integrated'
AppPoolIdentityForWebsite: 'ApplicationPoolIdentity'
- task: IISWebAppDeploymentOnMachineGroup@0
displayName: 'Deploy Web Application'
inputs:
WebSiteName: ${{ parameters.baseUrl }}
VirtualApplication: '${{ parameters.VirtualApiPath }}'
Package: '${{ parameters.Workspace }}/**/${{ parameters.PackageName }}'
TakeAppOfflineFlag: true
XmlTransformation: true
XmlVariableSubstitution: true