Any Windows/IIS people here? Is there any way to ...
# cfml-general
r
Any Windows/IIS people here? Is there any way to set the ApplicationPool .NET CLR version in a site's
web.config
file?
e
I have a saved command to do that but it's in powershell.
Copy code
$appPool = New-Item "nameOfMyWebsitePool"
$appPool | Set-ItemProperty -Name "managedRuntimeVersion" -Value "v4.0"
r
Hummm, I'm getting that impression that it can't be done in the
web.config
file. We have an opaque deployment system that I don't have access to that is resetting the version to v2. I might have to find someone who has access to add something like that, thanks.
e
You could wrap it in a powershell file and execute it on serverInstall as a cmdbox script
r
Ooooh, now that's an idea...
e
I had a task runner in cmdbox which has this line
Copy code
command( "!PowerShell.exe -File " & iisSetupFilePhysicalPath & " -WebsitePhysicalPath " & appWWWootFolder & " -AppPoolName " & appPoolName & " -WebSiteName " & appPoolName ).run();
there are many ways to wire that up. You could use the
server.json
Copy code
"scripts":{
        "onServerInstall":"box run taskrunnerMethodWithPowerhsell",...
r
Thanks, I'll pursue that line of thought 👍