locked
Problem with AD membership provider version RRS feed

  • Question

  • The portal seems to work ok and lead flows to CRM. But if i try and login, following error comes:

    any ideas?

    ---

    Server Error in / Application.

    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: An operations error occurred.

    Source Error:
    Line 39:         <add name="CrmMembershipProvider" type="System.Web.Security.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName" />

    Source File: C:\downoads\CustomerPortal\Web\web.config    Line: 39

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.233

    Tuesday, June 28, 2011 6:12 PM

All replies

  • There are two places to configure in the web.config when you use Active Directory for a membership provider in the portal.  I will assume that you downloaded the updated portal from my blog site.

    The error location you have shown is where the membership provider is hooked up, but you will notice that there is an attribute there called connectionStringName, and it is pointing to ADConnectionString.  What you have to do is to locate the ConnectionString section in the web.config and add/configure a connection string with that name that points to your Active Directory deployment.

    The web.config that you downloaded comes with values that are used on the partner demo VPC, and that uses CONTOSO as the domain name.  You need to modify it to fit your own network.  Here is the connection string you need to adjust:

    <add name="ADConnectionString" connectionString="LDAP://contoso.com/CN=Users,DC=contoso,DC=com" />


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Friday, July 1, 2011 12:13 AM
    Moderator
  • Thanks Shan,

    I have noticed the connection string and modified it accordingly.

    No luck yet.

    Do you think it could be because my web portal is not part of ad?

     

    Friday, July 1, 2011 4:14 AM
  • I am now having the exact same problem I have modified to connections string. To point to my network. But the Server is in a different forest than the user I'm trying to authenticate as. In that scenario is there something I can do to authenticate agains the orginal ad.

     

    Thanks

     

    Friday, January 6, 2012 9:40 PM
  • Ok so I belive I'm making progress maybe. Based on other AD Apps in our envirionment I have modified my Connection String and added the connectionUserName and connectionPassword to the "CrmMembershipProvider" element in my Web Config which no long blows up on the configuration but I am getting "Your login attempt was not successful. Please try again" when trying to login the user I have crated in CRM. The underlying Event in the Event Log is :

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          1/9/2012 12:41:07 PM
    Event ID:      1315
    Task Category: Web Event
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Description:
    Event code: 4006
    Event message: Membership credential verification failed.
    Event time: 1/9/2012 12:41:07 PM
    Event time (UTC): 1/9/2012 5:41:07 PM
    Event ID: b4257afdabc345a69978ed306f974741
    Event sequence: 45
    Event occurrence: 6
    Event detail code: 0 
     
    Has Anyone Else solved this Error?

    Thanks


    Monday, January 9, 2012 5:45 PM
  • I don't know if it is possible to sign in on a web server to another forest altogether, but it sounds like you have it working on other websites.  At this point, once you hook up the active directory membership provider, you should follow all the steps to configure it properly.  Since you have a unique environment, I would recommend closely looking at a system that is functioning and the portal to try to spot the differences.  There should be one difference somewhere.  You may also want to sniff the network on that machine while you authenticate to see where the network traffic is going.  AD authentication is very sensitive to addresses and dns name resolution, so pay very close attention to everything, including your LDAP connection string in the web.config file.
    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    Monday, January 23, 2012 3:32 AM
    Moderator
  • Shan,

    I'm not sure if the above comment was for my error. I have this running with the same error locally on my machine which is authenticating to AD on the same forest. This doesn't appear to be an error associated with ad connectivity I believe it is because the account(Contact) in crm has no way to authenticate..... any other suggestions

     

    Thanks

    Dave

    Monday, January 23, 2012 4:56 PM
  • email me at firstname.lastname@adxstudio.com and I will set up a Lync call and help you troubleshoot.

    ASP.NET will do the authentication and the portal code will look up a contact record where the adx_username field (the username field you see in the web authentication tab) on the contact record is equal to the thread identity.  It is as simple as wiring up the active directory membership provider and ensuring you have a contact record with the same username plus having the 'logon enabled' flag turned on.


    Shan McArthur www.shanmcarthur.net Check out the commercial edition of xRM portals @ www.adxstudio.com
    • Proposed as answer by Palak Kadakia Wednesday, January 25, 2012 9:23 PM
    Monday, January 23, 2012 5:00 PM
    Moderator
  • Ok so I belive I'm making progress maybe. Based on other AD Apps in our envirionment I have modified my Connection String and added the connectionUserName and connectionPassword to the "CrmMembershipProvider" element in my Web Config which no long blows up on the configuration but I am getting "Your login attempt was not successful. Please try again" when trying to login the user I have crated in CRM. The underlying Event in the Event Log is :

    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          1/9/2012 12:41:07 PM
    Event ID:      1315
    Task Category: Web Event
    Level:         Information
    Keywords:      Classic
    User:          N/A
    Description:
    Event code: 4006
    Event message: Membership credential verification failed.
    Event time: 1/9/2012 12:41:07 PM
    Event time (UTC): 1/9/2012 5:41:07 PM
    Event ID: b4257afdabc345a69978ed306f974741
    Event sequence: 45
    Event occurrence: 6
    Event detail code: 0 
     
    Has Anyone Else solved this Error?

    Thanks


    "Ok so I belive I'm making progress maybe. Based on other AD Apps in our envirionment I have modified my Connection String and added the connectionUserName and connectionPassword to the "CrmMembershipProvider" element in my Web Config "

    You had ConnectionUserName and Password to this line : ?

    addname="CrmMembershipProvider"type="System.Web.Security.ActiveDirectoryMembershipProvider"connectionStringName="ADConnectionString"attributeMapUsername="sAMAccountName"/>

    Please can you tell me where to put the connectionusername and password and what type of credential did you submit ?

    Thank's in advance

    Thursday, February 9, 2012 12:33 AM