Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Membership Registrar

Describes how to use the Membership Registrar in Optimizely Commerce Connect 13.

See Configure membership providers [Legacy] for information about setting up ASP.NET membership.

📘

Note

This configuration requires the EPiServer.Commerce.Security NuGet package as dependency.

using EPiServer.Commerce.Security;
    using EPiServer.Framework;
    using EPiServer.Framework.Initialization;
    using EPiServer.ServiceLocation;
    using EPiServer.Web;
    using log4net;
    using System;
    using System.Collections.Generic;
    using System.Configuration;
    using System.Linq;
    using System.Web.Routing;
    using System.Web.Security;
    
    namespace WebApplication1
      {
        [InitializableModule]
        [ModuleDependency(typeof(Mediachase.Commerce.Initialization.CommerceInitialization),
                          typeof(EPiServer.Commerce.Initialization.InitializationModule))]
        public class InitializeCommerceSiteModule : IConfigurableModule
          {
            public void Initialize(InitializationEngine context)
              {
              }
            public void Preload(string[] parameters)
              {
              }
            public void Uninitialize(InitializationEngine context)
              {
              }
            public void ConfigureContainer(ServiceConfigurationContext context)
              {
                context.Container.Configure(ce =>
                  {
                    ce.For<IRegistrar>().Singleton().Use<MembershipRegistrar>();
                  });
              }
          }
      }