Develop Azure Web App Extension to intercept HTTP traffic

Vijay Manda 6 Reputation points
2021-01-21T01:24:02.093+00:00

Hi, I want to Develop an Azure Web App extension to be able to intercept HTTP traffic so that I can read the request header fields and be able programmatically set custom response headers. This I guess this is similar to how Application Insights, New Relic, Dynatrace and other extensions intercept the traffic.

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 22,706 Reputation points Moderator
    2021-01-22T11:09:12.313+00:00

    Thanks for asking question! An extension is basically a web app that runs alongside the regular application and is available in SCM. You may refer to blog for Writing a Site Extension for Azure Websites

    If I am understanding right you wants to intercept the pipeline which requires an HttpModule injected into the processing path. This is not an extension.

    Adding some information below might be helpful:

    This is for ASP.Net on .Net framework.

    Overview of HttpModules: IIS Modules Overview | Microsoft Learn

    Injecting an HttpModule into the pipeline on Azure: Migrating a static web site using custom HTTP modules to Azure App Service

    Sample code for HttpModule: Implement Custom HttpHandler And Custom HttpModule

    ASP.Net Core uses middleware. Middleware is injected into the pipeline in the Configure code of the application.

    How to migrate HTTP Module to .Net Core: Migrate HTTP handlers and modules to ASP.NET Core middleware

    Also, If you could share what is your platform and what is the end goal to this, to help you better on this.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you.

    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.