tags:

views:

29

answers:

3

Hi -I am running a CMS web site on WSS 3.0.

I would like to have a custom sign-in page for the publishers. Do I have any other alternative other than the Welcome control? (For example, could I use ASP.NET Login control?

Thank you for your help.

+1  A: 

That would depend on the authentication mechanism that you use. If you're using Active Directory, you're pretty much tied to the Welcome control. If however you're using Forms Based Authentication, you can control to login page more completely. FBA can be tricky to configure and I'd recommend staying with AD if you can, but if you have to go FBA, here's a good guide:

http://technet.microsoft.com/en-us/library/cc262201(office.12).aspx

Cornelius J. van Dyk
Thank you that was really helpful.
Bruno Ligutti
+1  A: 

This is really not much difficult. It can only be happen if you have Forms based authenticated site not windows based, then you must have to modify login.aspx page.

this relies in _layouts folder of 12 hive. so you have to modify it. Best way to do is, fo to _layouts folder, make a copy of it and paste it in somewhere in the disk and then change the location in IIS properties for the site of the _layouts folder to your copied one. and make the changes of that login page.

Points to remember.: It uses a master page and there are 5 or 6 customplaceholders requires. so do have them in your new masterpage.

Next is about the code behing for login control to work. If you are customizing your login code. then you have to modify

this is an example :

using System; using System.Web.Security; using System.Web.UI.WebControls;

namespace CustomLoginPage { public class Login : Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase { protected System.Web.UI.WebControls.Login loginBox; protected override bool AllowAnonymousAccess { get { return true; } } protected override bool AllowNullWeb { get { return true; } }

  protected void Login_Click(object sender, EventArgs e)
    {
    if (AuthenticateUser(loginBox.UserName, loginBox.Password)) 
      return;
    }
    protected bool AuthenticateUser(string emailAddr, 
      string password)
    {
      string userName = emailAddr;
      MembershipUserCollection coll = 
        Membership.FindUsersByEmail(emailAddr);
      if (coll != null && coll.Count == 1)
      {
        // We're doing this to force the enumerator to give us the 
        // one and only item because there is no by int indexer
        foreach (MembershipUser user in coll)
        {
          userName = user.UserName;
        }
      }
      if (Membership.ValidateUser(userName, password))
      {
      FormsAuthentication.RedirectFromLoginPage(userName, true);
        return true;
        }
        return false;
    }
}

}

so please do modify it.

The one Url which i follow to perform this is :

http://www.devx.com/enterprise/Article/35068/1954

Go ahead and if you face any issues. feel free to contact me : [email protected]

Ankur Madaan
Hi Ankur that was really helpful thank you.
Bruno Ligutti
A: 

The answers below are really helpful -but I'm afraid my environment is limited (WSS 3.0, shared hosting).

So I simply added this link which opens up the authentication dialog:

<a href="/_layouts/Authenticate.aspx?Source=/_layouts/settings.aspx">Sign in</a>

(Where the Source parameter indicates the URL to redirect to upon authentication.)

Thank you.

Bruno Ligutti