APGvNext (Sam)
vNext Owner
- Total Posts : 12456
- Reward points : 218330
- Joined:
- Status: offline
Windows Authentication without AD membership provider
If you wish to use Windows Authentication without AD provider, the solution is to: - Configured IIS to enable Windows Authentication and disable Anonymous Authentication;
 - 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;
 - Leave ASPPlayground.NET Forum Software configured with the default configuration i.e. Forms Authentication Enabled without enabling any Membership Provider Integration.
- Make sure you uncheck “No Action – Must Register First” option under ASPPlayground Admin Control Panel, User Features 1/2, Guest Permission
- 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).
- 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 - Do NOT mix this method with the AD Membership Provider integration described here. In other words, make sure you
- do NOT add any AD membership provider information into the forum's web.config, and
- do NOT set EnableMembershipIntegration appSettings key to true.
post edited by Samuel -
Attached Image(s) 
|