HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Add Azure event provider to .NET Core application

Describes how to use an event provider that uses Azure Service Bus as the transport mechanism.

📘

Note

You need to add the EPiServer.Azure package to your solution, which has the extension methods on the IServiceCollection interface.

The following example shows how to add the Azure Event Provider to an Optimizely Content Management System (CMS) application.

using Microsoft.Extensions.DependencyInjection;
using System;

namespace SampleBlob {
  public class Startup {
    public void ConfigureServices(IServiceCollection services) {
      services.AddAzureEventProvider(o => {
        o.ConnectionString = "{The Azure event connection string}";
        o.TopicName = "{The topic name}";
        o.SubscriptionName = "{Subscription name}"; // Set to the local machine name if not set
      });
    }
  }
}

📘

Note

This document does not apply to Optimizely Digital Experience Platform (DXP) CMS 12 customers. Instead they should follow the steps on Create and deploy a CMS site; specifically, the EPiServer.CloudPlatform.Cms package, and associated startup code steps to hook up to the event system in Azure.