Kernel Mode Off - Deploy to IIS

Hi! Is it possible to deploy a IIS Website with the Kernel Mode “Off” using the “Deploy to IIS” Step Template?
It’s kind of annoying that I have to turn it off and Reset IIS (affecting Production) after every new IIS Deployment.

Thanks for the Advice!

Ric

Hi @ricardo.freymann,

Thanks for getting in touch!

While we don’t have anything built in to our IIS step that will accomplish this we do have one approach which should work. If you add the below code to your post deploy script it should set kernel mode to off as part of your deployment.

$webSiteName = $OctopusParameters["Octopus.Action.IISWebSite.WebSiteName"]
$appCmdPath = $env:SystemRoot + "\system32\inetsrv\appcmd.exe"
& $appCmdPath set config "$webSiteName" -section:"system.webServer/security/authentication/windowsAuthentication" /useKernelMode:"False" /commit:apphost

Please let me know if you have any issues or any other questions.

Regards,
Alex

Hi Alex,

Thank you very much for your reply. Is an IIS Reset still needed with this approach?

Kind Regards,

Ricardo Freymann

Inter-/Intranetservices

Dataport_RGB_pos_100px

Dataport

Niederlassung Hamburg

Billstraße 82, 20539 Hamburg

www.dataport.de

ricardo.freymann@dataport.de

Telefon:
040 42846-3352

cid:image002.png@01D41DB9.EC5E1110 cid:image003.png@01D41DB9.EC5E1110 cid:image004.png@01D41DB9.EC5E1110 cid:image005.png@01D41DB9.EC5E1110

Hi Ricardo,

I’m not sure as I don’t really have a test environment that I can use to validate this correctly. As this setting is per site I would have thought that a per site reset would be adequate, rather than requiring a full IIS reset.

If that is the case then it might be worth reading up on Blue/Green deployments in IIS as that would eliminate your outages (at least for deployments).

Sorry that I can’t give you a concrete answer here.

Regards,
Alex

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.