We've got an Azure DevOps release pipeline that executes the "Manage IIS Website" task to create or update a site + app pool on a Windows 2016 server, English version.
The names of the app pool and the site contain "ö". This has worked fine before, but after migrating the (virtual) server to a new hosting provider, including conversion from VMware to Hyper-V, it fails.
The problem is that the output of the appcmd list
command, that correctly and successfully lists the existing app pool/site, is not correctly interpreted by the agent, so it doesn't "see" that the app pool/site already exists, and tries to add/create it instead of updating the existing one. The subsequent appcmd add
command fails because the app pool/site already exists.
I tried renaming the app pool to "o" instead of "ö", and then it works (for the app pool), so it's pretty clear that this is the problem.
From the log at this state (anonymized):
2020-01-14T10:12:37.2971066Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list apppool /name:"AppPoolWitho"
2020-01-14T10:12:37.4439073Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" set apppool /apppool.name:"AppPoolWitho" -managedRuntimeVersion:v4.0 -managedPipelineMode:Integrated -processModel.identityType:SpecificUser -processModel.userName:"SERVER\TheUser" -processModel.password:"***"
2020-01-14T10:12:37.5380063Z APPPOOL object "AppPoolWitho" changed
2020-01-14T10:12:37.5493192Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" list site /name:"Site Name With ö"
2020-01-14T10:12:37.6520709Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" add site /name:"Site Name With ö" /physicalPath:"D:\MyProj\TheProj\Dev\wwwroot"
2020-01-14T10:12:37.7181428Z ERROR ( message:Failed to add duplicate collection element "Site Name With �". )
2020-01-14T10:12:37.8944458Z ##[error]Process 'appcmd.exe' exited with code '183'.
2020-01-14T10:12:37.9257153Z ##[section]Finishing: Manage IIS Website
What can I do to fix it?
We do want to use the Swedish names as we have before. I do understand that using aao instead of åäö will get me up and running, but that's a workaround and not a fix.
Is there a setting somewhere that I can change in Windows, the Azure agent, the pipeline, for PowerShell...?