Try our conversational search powered by Generative AI!

Active Directory authentication in Commerce Manager

Vote:
 

Hi.

I'm trying to allow AD authentication in Commerce Manager and I'm running into a very strange issue. I'm using Commerce Manager v5.2.628. I've succeded implementing it in CMS and I've already implemented the code from the following articles:

http://world.episerver.com/Blogs/Dan-McKeaney/Dates/2012/8/Active-Directory-Membership-Provider-for-EPiCommerce/

https://thecommerceguy.wordpress.com/2014/09/01/syncing-active-directory-groups-for-use-in-episerver-commerce/

And I'm getting this strange exception when loading the Commerce Manager:

ClassFactory not initialized
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: EPiServer.BaseLibrary.ClassFactoryException: ClassFactory not initialized

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ClassFactoryException: ClassFactory not initialized]
   EPiServer.BaseLibrary.ClassFactory.get_Instance() +123
   EPiServer.BaseLibrary.Context.get_Current() +27
   EPiServer.Security.MultiplexingMembershipProvider.get_CurrentProvider() +13
   EPiServer.Security.MultiplexingMembershipProvider.set_ApplicationName(String value) +11
   Mediachase.Cms.CmsHttpModule.InitMembership(HttpContext context) +38
   Mediachase.Cms.CmsHttpModule.context_BeginRequest(Object sender, EventArgs e) +83
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

I'm pretty sure it's a config issue, but I can't seem to track it down, no matter what. So a little help would pe really appreciated. Let me know if you need any additional info.

Thanks.

Below is my Web.config file (I've removed my AD user and pass)



  
    
    
      
#117925
Feb 24, 2015 11:25
Vote:
 

try 
type="EPiServer.Security.MultiplexingRoleProvider, EPiServer.Framework" 

rather
type="EPiServer.Security.MultiplexingRoleProvider, EPiServer" 

Regards
/K

#118073
Feb 26, 2015 16:36
Vote:
 

Getting this error when trying EPiServer.Framework:

Could not load type 'EPiServer.Security.MultiplexingRoleProvider' from assembly 'EPiServer.Framework'.

#118143
Feb 27, 2015 17:06
Vote:
 

What version are you using, looks like you are missing EPiServer.Framework reference as well as the configuration section for episerver.framework

You need these sections 

 <section name="episerver.framework" type="EPiServer.Framework.Configuration.EPiServerFrameworkSection, EPiServer.Framework" />
    <section name="episerver" type="EPiServer.Configuration.EPiServerSection, EPiServer.Configuration" />
    <section name="episerver.shell" type="EPiServer.Shell.Configuration.EPiServerShellSection, EPiServer.Shell" />

and this as well

<episerver.framework>
    <scanAssembly forceBinFolderScan="true" />
    <appData basePath="appData" />
  </episerver.framework>
  <episerver>
    <applicationSettings enableModelSyncCommit="false" uiUrl="~/UI/" enableScheduler="false" />
  </episerver>
  <episerver.shell>
    <publicModules rootPath="~/modules/" />
    <protectedModules rootPath="~/EPiServer/">
      
      
    <add name="Shell" /><add name="CMS" /></protectedModules>
  </episerver.shell>
  <location path="Modules/_Protected">
    <system.webServer>
      <validation validateIntegratedModeConfiguration="false" />
      <handlers>
        <clear />
        <add name="BlockDirectAccessToProtectedModules" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
      </handlers>
    </system.webServer>
  </location>
#118367
Mar 05, 2015 9:35
Vote:
 

I'm using EPiServer v6.1.379.0 and Commerce Manager v5.2.628. I added the sections you posted, but I'm still getting the same error: [ClassFactoryException: ClassFactory not initialized]

#118395
Edited, Mar 05, 2015 13:51
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.