Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Suraj Pant 11 posts 42 karma points
    Oct 14, 2013 @ 14:03
    Suraj Pant
    0

    Active Directory integration with nForum

    Hi Guys,

    Has anyone done AD integration with nForum? 
    Please suggest.

    Regards,
    Suraj

  • Suraj Pant 11 posts 42 karma points
    Oct 15, 2013 @ 07:49
    Suraj Pant
    0

    Hi All,

    Anyone..?

    Lee.. can you provide some guide/link etc.. if available.

    Regards,
    Suraj 

     

     

  • Suraj Pant 11 posts 42 karma points
    Oct 17, 2013 @ 12:28
    Suraj Pant
    0

    Hi All,

    Further on this. Once I set default membership provider to my AD provider, it start using AD but giving many errors as Users from AD does not have properties required for nForum users. 

    Can you suggest how can I get out of these, I like to retain these property somehow.
    Please suggest.

    Regards,
    Suraj

     

     

  • Paul Fowles 75 posts 184 karma points
    Nov 13, 2013 @ 15:53
    Paul Fowles
    0

    Hi Suraj,

     

    You need to add all the Forum Member properties with the correct alias' even the TwitterUrl one into your ADMember member type. You need to also add a Email property as well and change the member email field to that property in the source code to access all nforum functions

     

    Paul

  • Devin 87 posts 251 karma points
    Jan 27, 2014 @ 16:06
    Devin
    0

    Could someone please provide steps as to the implementation process of doing this? I have setup a new provider in the configs, just not sure what to change in the code to get the forum to login as an AD user.

  • Paul Fowles 75 posts 184 karma points
    Jan 28, 2014 @ 17:26
    Paul Fowles
    1

    Hi Devin,

    Firstly, make sure all Forum User Member Properties with the correct alias are in the ADMember member type.

    Secondly, in go into project nforum.businesslogic

     -class MembershipHelper.cs

    -method ForumUserRoleName  

     change the  return to return "ADMember" instead of "ForumUser" 

    - class ForumMember.cs and create an email property to replace all things relating to m.Email with that property.

    Hope this helps

    Paul

     

     

  • Devin 87 posts 251 karma points
    Jan 29, 2014 @ 17:54
    Devin
    0

    Hey Paul,

    Thanks for the info, will go give it a try and report back.

    Appreciate the help.

    Devin

  • Devin 87 posts 251 karma points
    Jan 30, 2014 @ 18:20
    Devin
    0

    Paul,

    Got it to work :) Amazing thank you!

    Devin

  • Paul Fowles 75 posts 184 karma points
    Jan 31, 2014 @ 16:39
    Paul Fowles
    0

    no probs glad I could help :)

  • Adi 79 posts 183 karma points
    Feb 03, 2014 @ 11:37
    Adi
    0

    Hello,

    I am also trying to integrate AD with nforum but I don't have that luck like Divine;)

    I can't fin files mentioned here

    -class MembershipHelper.cs

    -method ForumUserRoleName

    change the return to return "ADMember" instead of "ForumUser"

    • class ForumMember.cs and create an email property to replace all things relating to m.Email with that property.

    Also is there perhaps some step-by-step tutorial for this? I couldn't find much on Google apart this topic which was the closest one.

    Best regards, Adi

  • Paul Fowles 75 posts 184 karma points
    Feb 03, 2014 @ 14:02
    Paul Fowles
    0

    Hi Adi,

    If you have got the source code from codeplex it should look something like this:-

     

    namespace nForum.BusinessLogic
    {
        public static class MembershipHelper
        {
            /// <summary>
            /// Returns the MemberGroup/MemberType name
            /// </summary>
            public static string ForumUserRoleName
            {
                get { return "ForumUser"; } /*Normal Website & Extranet*/
                //get { return "ADMember"; } /*Intranet*/
            }
     
  • Adi 79 posts 183 karma points
    Feb 03, 2014 @ 21:04
    Adi
    0

    Hello,

    things are moving forward because I found the source code on this link

    enter image description here

    but please note that I still amateur in Umbraco so I kindly ask you to direct me with more detail what exactly I should do in order to use your suggestions and implement AD with nforum.

    Devin wrote that he got it from first time but I unfortunately I am not that experienced. I would also like to ask Devin to wrote little more how did he achieve this in such short time beacuse I am stuck;(

    Thank you, Adi

  • Devin 87 posts 251 karma points
    Feb 06, 2014 @ 14:59
    Devin
    0

    Hi Adi,

    You will firstly need access to the source files so you can make modifications, so download it from codeplex - http://nforum.codeplex.com/SourceControl/latest#ReadMe.txt

    Once you have done this you'll be able to modify the files necessary to get it working with Active Directory. I'm going to assume you know how to compile the source in Visual Studio. If not then there's a post on this board I think.

    Open "nForum.BusinessLogic" -> "MembershipHelper.cs":

    Change:

    get { return "WebsiteUser"; }

    to:

    get { return "ADMember"; }

    Open "web.config" in the Umbraco root directory.

    Find:

     <!-- Important: If you're upgrading Umbraco, do not clear the connection string / provider name during your web.config merge. -->

    Add underneath: (You'll need to add your LDAP connection string and of course change the domain to your Active Directory domain controller.)

     <!-- Active Directory Connection String -->
    <add name="ADMember" connectionString="LDAP://domain:389" />

    Find:

              <add enablePasswordRetrieval="false" enablePasswordReset="false"
    requiresQuestionAndAnswer="false" passwordFormat="Hashed" name="UsersMembershipProvider"
    type="umbraco.providers.UsersMembershipProvider" />

    Add underneath: (This is the Active Directory Membership Provider.)

    <!-- Active Directory Membership Provider -->
    <add name="MyADMembershipProvider"
    type="System.Web.Security.ActiveDirectoryMembershipProvider,
    System.Web, Version=2.0.0.0, Culture=neutral,
    PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="ADMember"
    attributeMapUsername="sAMAccountName"/>

    I'm not sure if this next step is necessary but I think I needed to do it for it to work properly.

    Find:

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">

    Replace with:

     <membership defaultProvider="MyADMembershipProvider" userIsOnlineTimeWindow="15">

    That was enough to get it working for me. Then you'll need to either add the property fields into Active Directory (for Karma, post count etc) or just remove the checks from the code.

    Hope this helps anyone trying to implement this.

  • adnan 2 posts 22 karma points
    Feb 13, 2014 @ 00:53
    adnan
    0

    Hi Devin,

    Can you help me?

    How I can add the property fields into Active Directory (for Karma, post count etc)?

    I try just to use nforum with Umbraco Active Directory Authentication package LDLUmbAdAuth_0.2.zip, but I do not have  any sucess.

    Also I try your membership provider but I can not get members.

  • Devin 87 posts 251 karma points
    Feb 13, 2014 @ 11:38
    Devin
    0

    Hello Adnan,

    You will need to contact the person who administers Active Directory to add in the fields. I've never done it before so I'm really not sure how it's done exactly. I'm trying a different route.

    http://our.umbraco.org/wiki/how-tos/membership-providers/use-active-directory-to-authenticate-site-members-%28intranet%29

    I want to use this so a member is created and mapped with the Active Directory user, which means you can still control users in Umbraco and add fields etc.

    If the server is in the local network of Active Directory then my edits should work, of course the configuration will depend on your setup.

    Thanks

Please Sign in or register to post replies

Write your reply to:

Draft