-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IIS Web Application Management #12490
Comments
@fthkucuk The issue is happening because appcmd.exe throws an error if the app pool you are trying to stop is already stopped. Ideally we should check the status of the app pool before executing the command. This is an enhancement. For now you can mark this task to continue on error to avoid failing the pipeline. |
This issue is stale because it has been open for a year with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days |
I think this enhancement should be implemented. Is the code source of the task available somewhere ? (If yes, What file ?) |
I agree that the task should not return an error if the application pool is already in the stopped state. |
Can we reopen this issue? We see warning sometimes after deployment. I am worried about the "continue on error" option one day will cause false positive. |
As a simple workaround for the original issue, you can start the apppool before stopping it. Starting an apppool which is already running does not generate an error. |
Sooooo... the desired behavior is stopping the app pool. If the result is that the app pool is stopped, so no change takes place, that's not an error. If the outcome is the same as the desired behavior, then returning an error code is a bug. Fix your bug. If you make a DELETE API call and the resource doesn't exist, there's debate over returning a 404 or a 200, but no sane person would return a 500. Return an exit 0 or a warning, but in no way is returning a stopped app pool for a request to stop an app pool an error. This is not an enhancement; this is a bugfix. |
This supports the point @brs713 is making. When the desired outcome has already been achieved and no change needs to take place... that's not an error. If anything it could be a warning, but definitely not an error. Found this issue that deals with the same behavior but for the "App Command on Target Machine" task. It seems to have been dealt with a long time ago. if ((($appPoolState -like "Started") -and $action -like "start") -or (($appPoolState -like "Stopped") -and $action -like "stop")) {
Write-verbose "Application pool '$appPoolName' is already in state of the action '$action'. Hence skipping the operation."
return
} Should something similar be done in this "IIS Web Application Management" task? |
this one should be re-opened. This is definitely issue which needs to be solved |
Hi,
I got an error iis web manage task cause apppool already stopped so I tried to additional appcmd.exe commands for use exit 0 or set errorlevel=0 but it didn't work. I tried something else like capture2 but I didn't see this command in log (You can see Capture 3). It seems to don't work additional arguments for web application management tasks. I'm using Azure DevOps Server 2019 Update 1
The text was updated successfully, but these errors were encountered: