Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuthentication Problems Child Portals using Auto LoginAuthentication Problems Child Portals using Auto Login
Previous
 
Next
New Post
9/28/2006 4:16 PM
 

Chris or anyone else that has tried this,  can you please explain in laymans terms how this is implemented, and in what steps?   Is it as simple as copy/paste the script above and execute in Query Analyzer?

Thanks so much, I look forward to trying this out.

 
New Post
9/29/2006 11:11 AM
 

It was very simple to impliment. No changes to the database, only the VB code. I changed the .NET code in the AspNetMembershipProvider.vb module to match the below:

~line 777 modify CreateUser:

Public Overrides Function CreateUser(ByRef user As UserInfo) As UserCreateStatus
    Dim createStatus As UserCreateStatus
    Dim _config As Authentication.Configuration = Authentication.Configuration.GetConfig()
    Dim ProviderTypeName As String = _config.ProviderTypeName
    Dim isADSIProvider As Boolean = (ProviderTypeName.IndexOf("Authentication.ADSIProvider") >= 0)

    Try
        ' check if username exists in database for any portal
        Dim objVerifyUser As UserInfo = GetUserByUserName(Null.NullInteger, user.Username, False)
        If Not objVerifyUser Is Nothing Then
            If objVerifyUser.IsSuperUser Then
                ' the username belongs to an existing super user
                createStatus = UserCreateStatus.UserAlreadyRegistered
            Else
                ' the username exists so we should now verify the password

                If isADSIProvider Or ValidateUser(objVerifyUser.PortalID, user.Username, user.Membership.Password) Then

                    ' check if user exists for the portal specified
                    objVerifyUser = GetUserByUserName(user.PortalID, user.Username, False)
                    If Not objVerifyUser Is Nothing Then
                          .....

I then recompled the code and copied the newly created dll files, I believe there were 4, to the bin directory of my site. It corrected my issues. What the code does is check to see if the site is active directory authenticated. If it is, it avoids the username and password check, which is why sign up to child portals fails. As the AD module doesn't store the actual AD password,  the password check always fails and thinks there are 2 different users trying to use the same username.

Also, make sure your site is configured for active directory authentication in the site settings, Forms authentication in the web.config, and copy your windowsignin.aspx file from the admin area to the root. Ensure this page is called, instead of the default.aspx page, and everything should work. Took me all of about 15 minutes.

 
New Post
6/28/2007 1:43 PM
 

How do you ensure the windowsignin.aspx is called instead of the default.aspx page? For example, if a user types in http://myserver/myhost/mychildportal I'd like it to show the default portal contents, not a signing page, and I'd like them automatically signed in.

When you say copy it to the root, do you mean the host root or the portal root?

 
New Post
6/29/2007 1:33 PM
 

I believe he means the portal root for each site.

Windowssignin.aspx is just a redirection page that calls the Active Directory authentication process if <add name="Authentication..... /> is uncommented in the web.config. At the end of process it's automatically redirected to the default page for the portal with the user logged in. If <add name="Authentication.... /> isn't uncommented then the authentication code is bypassed and the page goes to default.aspx without the user being signed in.

 
New Post
6/29/2007 2:09 PM
 

What I was missing is that each portal has its own sub-dir under the dnn root dir (dnn\portalname\), in addition to Portals\[number], which contains default.aspx. I copied the WindowsSignin files there and it seems to be working now, after removing Default.aspx from the Documents tab in IIS and adding WindowsSignin.aspx.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationAuthentication Problems Child Portals using Auto LoginAuthentication Problems Child Portals using Auto Login


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out