Updating Host.json using azure portal

Raguram Manokaran 90 Reputation points
2023-07-27T05:34:26.72+00:00

"We have developed an Azure function using Visual Studio 2019. Every time we update the host.json file in Visual Studio and publish it, it takes a lot of time. We have tried updating the host.json using the Azure portal, but we are getting an error. Please let me know if there is any way to update the host.json using the Azure portal."
User's image

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

1 answer

Sort by: Most helpful
  1. navba-MSFT 27,540 Reputation points Microsoft Employee Moderator
    2023-07-27T12:42:09.08+00:00

    @Raguram Manokaran Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I see that you are trying to update the host.json file for your Function App.

    Could you please follow the below steps and check if that helps ?
    a. Open the Azure portal and navigate to your function app.

    b. In the left-hand menu, select "Development Tools" and then select "Advanced tools (Kudu)".

    c. In the Kudu console, select "Debug console" and then select "CMD".

    d. Navigate to the "site/wwwroot" folder and locate the host.json file.

    e. select "Edit" as shown below:
    User's image

    f. Update the file as required and save the changes.

    g. You may have to restart your Function App after you make the changes in order for the changes to take effect.

    h. Note: If you wish to update the function.json, in the same wwwroot folder you can navigate to your function and find your function.json file and edit it accordingly.

    The host.json schema is mentioned in this article.

    Please note editing the code from the Azure portal is not a good practice though. You could try testing your code on the Visual Studio Dev environment locally and check if your app works fine. Then you can deploy your function app to Azure as explained here.

    Hope this helps.

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

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.