Forum Themes:
Welcome !

 Windows Authentication without AD membership provider

Author Message
Samuel

  • Total Posts : 11857
  • Reward points : 180790
  • Joined: May 23 '01
  • Status: offline
Windows Authentication without AD membership provider Fri. Nov 19, '10 12:47 PM (permalink)
If you wish to use Windows Authentication without AD provider, the solution is to:
  1. Configured IIS to enable Windows Authentication and disable Anonymous Authentication;
  2. Configure the Forum Application (the forum folder that is marked as an application) to use the Classic .NET AppPool if you are on IIS 7.0 or later;
  3. Leave ASPPlayground.NET Forum Software configured with the default configuration i.e. Forms Authentication Enabled without enabling any Membership Provider Integration.
    1. Make sure you uncheck “No Action – Must Register First” option under ASPPlayground Admin Control Panel, User Features 1/2, Guest Permission
  4. Add members to ASPPlayground so that the membership table for the forum is populated (simply use the Fast Member Import feature in the AdminCP). The Login value must match the users Active Directory (AD) account name, but password can be anything (not used in this integration mode).
  5. Modify a small section of code in the Default.aspx.vb file as follows (use the following code to replace the existing Protected Sub Page_PreInit ):
           
     Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit       
          Integer.TryParse(Request.QueryString("forumid"), RequestedForumID)       
     
          If Not User.Identity.IsAuthenticated Then       
              Dim strUsrNm As String       
     
             'Build a string containing the AD account name of the Windows Authenticated user                
             strUsrNm = Request.ServerVariables("LOGON_USER")       
             strUsrNm = Mid$(strUsrNm, InStr(1, strUsrNm, "\") + 1)       
             'Create the authentication ticket and add it to the cookie collection                
             FormsAuthentication.SetAuthCookie(strUsrNm, True)       
             'refresh the current page so the it displays “Welcome <username>”                
             Response.Redirect(Me.Request.Url.ToString)       
         End If       
     End Sub 
     
  6. Do NOT mix this method with the AD Membership Provider integration described here. In other words, make sure you
    1. do NOT add any AD membership provider information into the forum's web.config, and
    2. do NOT set EnableMembershipIntegration appSettings key to true.
<message edited by Samuel on Wed. Jan 19, '11 2:37 PM>
Attached Image(s)
ASPPlayground.NET
~ see our Version 4 plans here

 
#1
    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9