If you are trying to enable login to sitefinity using the active directory, you may encounter the following error:
The Active Directory Membership Provider has not been 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: System.InvalidOperationException: The Active Directory Membership Provider has not been initialized. Source Error: Line 27: void Login1_Authenticate(object sender, AuthenticateEventArgs e) Line 28: { Line 29: e.Authenticated = UserManager.Default.ValidateUser(this.Login1.UserName, this.Login1.Password); Line 30: } Line 31:
Source File: c:\Users\winslorj\Code\AutomatedResultsCom\website\Sitefinity\Login.aspx.cs Line: 29
This simply means that the connectionUsername and/or connectionPassword is not a valid active directory account. You must provide a connection user and password for role management and membership management. Thus, make sure you have these attributes and that they match a valid active directory account.
<roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity"> <providers> <clear/> <add name = "Sitefinity" connectionStringName = "ActiveDirectory" connectionUsername="ar\SitefinityService" connectionPassword="somePassword" groupMaps = "SitefinityAdmin" type = "Telerik.Security.ActiveDirectory.TelerikADRoleProvider, Telerik.Security" /> <add connectionStringName="DefaultConnection" applicationName="/" name="Public" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/>
</providers> </roleManager>
<membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType=""> <providers> <clear/> <add connectionStringName="ActiveDirectory" enableSearchMethods="true" attributeMapUsername="sAMAccountName" connectionUsername="ar\SitefinityService" connectionPassword="somePassword" name="Sitefinity" type="Telerik.Security.ActiveDirectory.TelerikADMembershipProvider, Telerik.Security" />
<add name="Public" connectionStringName="DefaultConnection" type="Telerik.DataAccess.AspnetProviders.TelerikMembershipProvider, Telerik.DataAccess" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0"/> </providers> </membership>
RadEditor - please enable JavaScript to use the rich text editor.
I often get asked why I'm willing to journal all of my Sitefinity discoveries. People think I'm insane to give away for free what I labored over at some point.
Let me answer that in 2 parts:
Talk to us about how we can help YOU!
Keep up with our Sitefinity discoveries! Click on the RSS feed icon below or sign up for our newsletter.