Doc step 1: what does it mean?

Apr 21, 2009 at 2:42 PM
ADRP Installation Instructions

1. Configure Blog Engine to use the System.Web.Security.ActiveDirectoryMembershipProvider class for its membership provider.
Make sure the "attributeMapUsername" attribute is set to "sAMAccountName"

What does this mean? Where do I configure this? It's not in web-config, since that is covered later in the doc.
Coordinator
Apr 21, 2009 at 2:54 PM
mogens,

The ADRP role provider is designed to work w/ the microsoft active directory membership provider. The membership provider provides authentication against active directory, while the ADRP roles provider provides authorization using active directory groups.

You must configured the membership provider section in your web.config so that it uses microsoft's ActiveDirectoryMembershipProvider class. Here is an example:
  <membership defaultProvider="AspNetActiveDirectoryMembershipProvider">
    <providers>

                <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

                    connectionStringName="ADConnectionString" connectionUsername="test\ldap" connectionPassword="RafeKemmis1" enableSearchMethods="true" attributeMapUsername="sAMAccountName" />

                  </providers>

            </membership>

You'll also need to define the connection string in the connectionStrings section of the web.config file:
   <connectionStrings>

        <add name="ADConnectionString" connectionString="LDAP://westfield/DC=test,DC=kemmis,DC=info"/>

    </connectionStrings>

One important thing to note is attributeMapUsername="sAMAccountName". This makes it so the user logging into blog engine doesn't have to qualify their username with the activedirectory domain.

Hope this helps!

Aug 5, 2009 at 11:05 PM

I am interested in this, is there any facility for domain trusts to authenticate users?

Mar 20, 2011 at 5:13 PM

When I try to login I am receiving the following error:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unable to establish secure connection with the server

Source Error:

Line 114:      <providers>
Line 115:        <clear/>
Line 116:        <add name="AspNetActiveDirectoryMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Line 117:          connectionStringName="ADConnectionString" connectionUsername="test\ldap" connectionPassword="RafeKemmis1" enableSearchMethods="true" attributeMapUsername="sAMAccountName" /> 
Line 118:        <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed"/>


Source File: C:\Inetpub\wwwroot\APDBlog\web.config    Line: 116


Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

<!-- [ConfigurationErrorsException]: Unable to establish secure connection with the server (C:\Inetpub\wwwroot\APDBlog\web.config line 116) at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType) at System.Web.Configuration.ProvidersHelper.InstantiateProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType) at System.Web.Security.Membership.Initialize() at System.Web.UI.WebControls.LoginUtil.GetProvider(String providerName) at System.Web.UI.WebControls.Login.AuthenticateUsingMembershipProvider(AuthenticateEventArgs e) at System.Web.UI.WebControls.Login.AttemptLogin() at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.account_login_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->