London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
The following example shows how to use the Membership Registrar in Episerver Commerce. See Configuring membership provider for information about setting up AspNet membership.
Note: This configuration requires the EPiServer.Commerce.Security NuGet packages 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>();
});
}
}
}
Last updated: Oct 12, 2015