I have a deployment slot for my app and I have this section in the web.config:
<applicationInitialization doAppInitAfterRestart="true">
<add initializationPage="/validate" hostName="Test-UI" />
</applicationInitialization>
I have auto-swap turned on for the slot.
Will the slot still swap if the page returns an error (status 500) ?
Edit: I can't just go ahead and break the app to test it because we have a fairly complicated process to even get to the deploy part.
Will the slot still swap if the page returns an error (status 500) ?
In short, yes, it will still swap.
In order to better understand the reasons for the swap failures it is first necessary to explain how the application code in the staging slot is initialized / warmed up prior to the swap to production.
Failures during these steps are the most common reasons for the overall failure of the swap operation.
So, if you get failures when initialized or warm up slot, it will cause failure of swap operation.
For more details, you could refer to this article.