Enabling Anonymous Authentication in iis-application-create step template

With this step template - http://library.octopusdeploy.com/#!/step-template/actiontemplate-iis-application-create

The resulting application is created, but only Windows Authentication is enabled -
Is there a way to modify the step template to also enable Anonymous Authentication?

Hi Alex,

You can modify the template and then submit a pull request to us. If the fix makes sense, we’ll upload it to the library

Dalmiro

Yea, I know -

I was more asking what I’d need to do!

Hi Alex,

Sorry about that! by the way you phrased that I thought you knew what to do :).

You should be adding a Powershell line to add this authentication method to the web app. This thread seems to show how to do it:

http://forums.iis.net/t/1165277.aspx?How+can+I+use+a+powershell+script+to+modify+authentication

It should go on the If and the else right at the bottom

if: https://gist.github.com/Dalmirog/208b4224910094b8ce87#file-script-ps1-L110-L112
else: https://gist.github.com/Dalmirog/208b4224910094b8ce87#file-script-ps1-L114-L117

This would make the script ALWAYS set the webapps with Anon auth. If you want to be able to choose whether to use this setting or not, you’re gonna have to add a field to the template on the json, and then execute that line or not on the Powershell script based on the value set to that field.

Good luck :slight_smile:

Dalmiro