Creating App Service Site Extensions and publishing them

Omer Roth 5 Reputation points
2023-10-10T12:56:58.54+00:00

Hello everyone,

I'm interested in creating a site extension for my company that will intercept HTTP traffic and collect some metrics for both Web Apps and Function Apps.

The idea is similar to how Datadog's extension works, but since our use case is very small - it doesn't justify buying the product as a whole.

I'm looking into site extensions because they work as a plug-and-play and also because I can't add custom code to each WebApp and Function App since the process would take months.

I know this question was asked back in 2021:
https://learn.microsoft.com/en-us/answers/questions/239093/develop-azure-web-app-extension-to-intercept-http

All the links there are either broken or don't provide the necessary information I'm looking for.

The information I'm missing:

  1. Once I create a Nuget package and upload it to nuget.org, how can I get it to appear in the Azure Site Extensions list?
  2. I'm aware I can utilize my Nuget repository using the SCM_SITEEXTENSIONS_FEED_URL variable.
    If I already have extensions installed, will they be removed because I'm switching sites?

Thanks in advance to whoever helps.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,895 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,581 Reputation points Microsoft Employee
    2023-10-11T00:57:35.2766667+00:00

    @Omer Roth To get your NuGet package to appear in the Azure Site Extensions list, you need to create a feed that points to your NuGet package. You can then add this feed to the Site Extensions list in the Azure portal.

    Here are the steps to create a feed and add it to the Site Extensions list:

    1. Create a NuGet package for your site extension and upload it to nuget.org.
    2. Create a new feed in Azure Artifacts or another NuGet feed provider.
    3. Add your NuGet package to the feed.
    4. In the Azure portal, go to your Web App or Function App and select "Extensions" from the menu.
    5. Click "Add" and select "Add from feed".
    6. Enter the URL of your NuGet feed and click "OK".
    7. Your site extension should now appear in the list of available extensions.

    Regarding your second question, switching sites should not remove any installed extensions. The extensions are installed on a per-site basis, so they will only be removed if you uninstall them from the site..


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.