Problem with stopping application pool

Hi

I’m running the step “IIS AppPool - Stop” that I got from the Community Library but I get the following error.

get-webitemstate : Cannot find path ‘IIS:\AppPools#{VpAdminNoAppPoolDev}’ because it does not exist.
*C:\Windows\system32\config\systemprofile\AppData\Local\Tentacle\Temp\3e0317ce-1be9-45d0-8ee2-63d8593431d7.ps1:12 char:5

  • if ((Get-WebAppPoolState $appPoolName).Value -ne “Stopped”){*

What could be the problem? All I do is to send in the variable #{VpAdminNoAppPoolDev} as the name and I took that from the list of available variables. And using a variable worked fine in a previous step in the process, where I created the application pool by using step template IIS App Pool - Create. I’ve also compared the PS code for the two steps and can’t find what the problem is.

Regards
Tonni

Hi Tonni,

Thanks for reaching out! Please follow these steps to send us the information we need to help you with this:

  1. Enable the debugging variables on your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

  2. Create a new release so the variables of (1) take effect and deploy it. If possible, try to run as fewer steps as possible to avoid the noise on the log (maybe just “create the pool” and “stop the pool”?)

  3. Send us the raw log http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Thanks!

Dalmiro

Hi

Attached is the raw log

Tonni

AppPoolNameVariableProblem.log.txt (171 KB)

Hi Tonni,

It looks like the variable #{VpAdminNoAppPoolDev} hasn’t been declared anywhere. The only traces of it across the deployment are when its being used as value for the app pool name:

- [AppPoolName] = '#{VpAdminNoAppPoolDev}'

Did you declare it on your project’s variables or it is part of a library variable set? In both cases please send a screenshot of where you declared this variable.

Thanks,

Dalmiro