Anonymous Authentication - Use Application Pool Identity

Is there any easy way in Octopus Deploy to set an IIS website Anonymous Authentication to use the Application Pool Identity vs the IUSR account?

I don’t see any options for it under IIS Web Site or IIS Application Pool.

This is on Octopus Deploy 3.3.3

AppPool.png

Hi Mike,

Thanks for reaching out. There’s no built-in way from Octopus, but you can do it with a bit of Powershell in a Post-Deploy script

Script

Import-Module WebAdministration

$websiteName = $WebSite

Set-WebConfigurationProperty system.webServer/security/authentication/anonymousauthentication -PSPath 'IIS:\' -Location "$WebSiteName" -Name userName -Value "" -Verbose

See also attached screenshots for reference.

Hope that helps!
Dalmiro

Works perfect, thanks!