Correlate.AspNet.WebApi 6.1.1

dotnet add package Correlate.AspNet.WebApi --version 6.1.1
                    
NuGet\Install-Package Correlate.AspNet.WebApi -Version 6.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Correlate.AspNet.WebApi" Version="6.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Correlate.AspNet.WebApi" Version="6.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Correlate.AspNet.WebApi" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Correlate.AspNet.WebApi --version 6.1.1
                    
#r "nuget: Correlate.AspNet.WebApi, 6.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Correlate.AspNet.WebApi@6.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Correlate.AspNet.WebApi&version=6.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Correlate.AspNet.WebApi&version=6.1.1
                    
Install as a Cake Tool

Classic ASP.NET (IIS) integration.

An ASP.NET (classic/.net framework) implementation to correlate activities between decoupled components (eg. microservices) via a HTTP header.

Usage

This package provides a managed IIS HTTP module to automatically handle the correlation of HTTP requests and responses. To activate the module, add it to your web.config file.

  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules>
      <add name="CorrelateHttpModule" type="Correlate.AspNet.CorrelateHttpModule, Correlate.AspNet.WebApi, Version=6.1.0.0, Culture=neutral, PublicKeyToken=null" />
    </modules>
  </system.webServer>

You need to specify a fully qualified name for CorrelateHttpModule.

If you already have a <modules>/<httpModules> section in your web.config, you can simply just add the line with CorrelateHttpModule.

Dependencies

The HTTP module requires certain dependencies to be registered and resolvable from the GlobalConfiguration.Configuration.DependencyResolver dependency container.

For convenience, this package comes with an adapter DefaultDependencyResolver that is based on IServiceProvider (Microsoft's current abstraction). With this adapter, you can use the dependency injection registration extensions provided by the Correlate.DependencyInjection package to configure the DependencyResolver on HttpConfiguration.

Of course, dependency registration can be done using any DI container of your choice, as long as it supplies all the necessary services.

Example

Global.asax.cs
using System.Web.Http;

namespace MyWebApp;

public class WebApiApplication : System.Web.HttpApplication
{
    protected void Application_Start()
    {
        GlobalConfiguration.Configure(WebApiConfig.Register);
        GlobalConfiguration.Configure(DependencyInjectionConfig.Register);
    }
}
~/App_Start/DependencyInjectionConfig.cs
using System.Web.Http;
using Correlate.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;

namespace MyWebApp;

public static class DependencyInjectionConfig
{
    public static void Register(HttpConfiguration config)
    {
        ServiceProvider services = new ServiceCollection()
            // Register dependencies.
            .AddCorrelate()
            .BuildServiceProvider();

        // Create and set the adapter.
        config.DependencyResolver = new DefaultDependencyResolver(services);
    }
}

Note: do not dispose the created ServiceProvider when leaving this method. It will be disposed automatically by the adapter on app recycle/shutdown.

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
6.1.1 246 11/6/2025
6.1.0 222 10/7/2025