I am setting up Azure Devops to deploy a .Net Core Web Application to Azure. In Visual Studio, I have created a publish profile and publishing with this profile works correctly. I use the user name and password from the portal.
Now I am trying to get this to work in an Azure Devops pipeline. There are steps to get Nuget packages, get key vault secrets, and build. I have verified that the zip file package is getting created correctly.
I am using an "Azure App Service Deploy" step for deployment. It points to the pubxml profile and the zip package and the password is the same one that I use for publishing from Visual Studio. When it runs, I get the following error:
Error Code: ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP
More Information: Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. createApp http://go.microsoft.com/fwlink/?LinkId=178034 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP.
Error count: 1.
Looking at the log, it is issuing the following command:
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='D:\a\1\a\CallService.zip' -dest:auto,computerName="https://xxxxx.scm.azurewebsites.net:443/msdeploy.axd?site=xxxxx",userName="xxxx",password="xxxxx",authtype="basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"D:\a\1\a\CallService.SetParameters.xml" -enableRule:DoNotDeleteRule -retryAttempts:6 -retryInterval:10000
The user name and password have been redacted here but they match what is in the portal for deployment credentials and what I am using fom Visual Studio.
I would expect this to work since the Visual Studio deploy is working with the same profile and creds. I would like to know if anyone knows how to make the deployment work from Azure DevOps.
D:\a\1\a\CallService.SetParameters.xml
? – spikey