Thanks for getting back to me.
The official documentation here:
https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots
https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots#troubleshoot-swaps
And the "unofficiel" one you have linked to from the documentation as well:
https://ruslany.net/2017/11/most-common-deployment-slot-swap-failures-and-how-to-fix-them/
When everything was working I had the following setup
Step 1
Prevent HTTPS-redirection in web.config via (and other rewrite-rules)
<add input="{WARMUP_REQUEST}" pattern="1" negate="true" />
<add input="{REMOTE_ADDR}" pattern="^100?." negate="true" />
Step 2
Whitelist internal IP's from "Access Restrictions" via the portal
100. 0.0.0/8
10. 0.0.0/8
127. 0.0.1/32
Step 3
WEBSITE_SWAP_WARMUP_PING_PATH = /warmup
WEBSITE_SWAP_WARMUP_PING_STATUSES = 200
WEBSITE_WARMUP_PATH = /warmup
The warmup-endpoint does nothing currently, except being very fast to deliver a response.
I then "swap with preview" so I can invoke a longer warmup-cycle that takes around 10-20 minutes.
Have tried replacing step 3 with the "<applicationInitialization>"-method in the web.config. Doesn't solve the issue though.