Azure Function App Slot WEBSITE_CONTENTSHARE

Alan Hunter 6 Reputation points
2023-01-12T11:47:45.96+00:00

Hi All,

When I try to carryout a SWAP of my Azure Function from a Deployment slot I get the following?

I have tried deleting the WEBSITE_CONTENTSHARE variable from the Application Settings screen but as soon as I try to do a SWAP it still provides the following.

User's image

I am presuming I do not want the SWAP to change the value for WEBSITE_CONTENTSSHARE in production?

Can someone advise how to avoid this?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,929 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,941 Reputation points Moderator
    2023-01-19T05:16:28.7733333+00:00

    @Alan Hunter Thanks for reaching out and apology for the delay. In case if you don't want to swap some of the setting in the application configuration then you need to make those settings stick to the slot while creating them. This document covers in detail about deployment slots and swap operation.

    As you want to preserve the WEBSITE_CONTENTSSHARE value during slot then unfortunately you cannot update WEBSITE_CONTENTSSHARE as Deployment slot settings only. In case if you try to update this value you should get the error Failed to update web app settings: 'WEBSITE_CONTENTSHARE' cannot be a slot setting.

    This section covers the list of Slot-specific/Non slot-specific settings.

    Feel free to get back to me if you have any queries or concerns.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.