When I'm trying to deploy a code to Azure function slot in portal, the message appears in terminal VSCode
Error: :( Application ErrorIf you are the application administrator, you can access the <a style="color: grey"href="https://name_funcion-name_slot.scm.azurewebsites.net/detectors">diagnostic resources.
When i check the deployment logs this error appears:
{"Code":"BadRequest","Message":"Encountered an error (ServiceUnavailable) from host runtime.","Target":null,"Details":[{"Message":"Encountered an error (ServiceUnavailable) from host runtime."},{"Code":"BadRequest"},{"ErrorEntity":{"Code":"BadRequest","Message":"Encountered an error (ServiceUnavailable) from host runtime."}}],"Innererror":null}
I would like to understand where I should have permission to deploy in the slot, because I can deploy normally in production slot. Idk, maybe some error with runtime?!
I created simple Http trigger and deployed to Azure function using
Consumptionplan.This is how i deployed my function in new slot. This worked for me.
#My Code :
productionslot:newslot:Add slot in
Deployment slots:To deploy to new slot from Vs Code:
OUTPUT:New Slot: