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 ForumsAuthenticationAuthenticationRemove/Hide the domain prefix from logon?Remove/Hide the domain prefix from logon?
Previous
 
Next
New Post
4/15/2008 4:17 PM
 

I still have DNN 3.x running because of the mods I have installed for AD Authentication.  With the release of provider 1.04 beta and child portal authentication I am now testing on DNN 4.8.   I have one small problem.  All of my users (900+) are used to the forms logon with out providing a domain name prefix.

Can anyone provide a code snippet so that I can remove this?
Thanks...

 
New Post
4/15/2008 4:49 PM
 

Paste the following code in login.aspx in the DesktopModules/authentication/ActiveDirectory folder. 

 

 

 

then change

<td colspan="2" align="center"><asp:textbox id="txtUsername" columns="9" width="130" cssclass="NormalTextBox" runat="server" /></td>

 

to:

 
<td colspan="2" align="center"><asp:textbox id="txtUsername" ontextchanged="change" columns="9" width="130" cssclass="NormalTextBox" runat="server" /></td>

in the same file

Hope this helps.

<script runat="server">

Sub change(ByVal sender As Object, ByVal e As EventArgs)

Select Case txtUsername.Text

Case "admin"

Case "host"

Case Else

   If txtUsername.Text.StartsWith("domain\") Then

      'The user added the wrong domain information

      If txtUsername.Text.Contains("domain\") Then

         txtUsername.Text = txtUsername.Text.Replace("domain\", "")
  

      End If
    txtUsername.Text = String.Format({0}@domain.com, txtUsername.Text)

Else

      'The user didn't enter the domain so add it for them
 if txtUsername.Text.EndsWith("@domain.com") then
 else
      txtUsername.Text = String.Format("{0}@domain.com", txtUsername.Text)
 End if
   End If

End Select

 

End Sub

</script>

 
New Post
4/21/2008 9:29 AM
 

Tom McMurtry wrote

Paste the following code in login.aspx in the DesktopModules/authentication/ActiveDirectory folder. 

 

 

I am running 4.8 also and there is no login .aspx at that location, only login.ascx

There is a WindowsSignin.aspx

Could you clarify your previos post?

Thanks - Jim

 
New Post
4/21/2008 11:03 AM
 

It's the login.ascx you want to use the script on.

 
New Post
4/21/2008 12:02 PM
 

Why is this so difficult?  (joking)  I cannot get forms authentication working with AD enabled.

Here is what I have done:
Setup AD authentication (userid, password, etc)
Edit the webconfig enabling the DotNetNuke.Authentication.ActiveDirectory, and commenting out the standard authentication.
First I tried auto login.  Changed the web.config so that Windows was the Authentication mode.  Setup the permissions on WindowsSignin.aspx and immediately everything works great.
Second I tried forms authentication.   Changed the web.config so that Forms was the Authentication mode.   Edit the login.ascx adding the script above the table, and changing the "textbox" as noted.
I tried my URL with the "?&ctl=login" and received this error:
E:\eDirectory\PROD\DesktopModules\AuthenticationServices\ActiveDirectory\Login.ascx(27): error BC30201: Expression expected.

I also tried adding the login module but this did not work either.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsAuthenticationAuthenticationRemove/Hide the domain prefix from logon?Remove/Hide the domain prefix from logon?


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