I am not a SharePoint techie by any means, but when something comes along that is simple enough for me then I will share.
I am working on a clients site and they requested a custom login page for their FBA. Here are some of the basics of how I was able to get it to work. First things first, (this was taken from the forum where the basic how to question was posted – I have tweaked the text a little.)
This is a common task when setting up FBA and/or ExCM. It is best practice to not edit existing WSS or MOSS files.
- 1. Navigate to the the SharePoint 12 hive…
- C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS
2. Copy the login.aspx page and rename it to your custom page name (customlogin.aspx). – I did it a bit different.
- 3. Tell SharePoint the new login page name. This can be done from the web.config file of your FBA zone. Modify the loginUrl attribute of the <forms /> tag. Change the login.aspx name to the page that you created in step 2.
ExCM ships with different sample login pages. Some include a ‘Forgot my password’, others include links to the ExCM registration pages. You can find these examples here… C:\Program Files\SharePoint Solutions\Extranet Collaboration Manager\Customizations. This directory also includes samples for login pages which match your publishing or team site.
I started with a new .aspx page and added the code below and then named my page customlogin.aspx. We changed the web.config file to look for our new aspx page. With some guidance from another colleague, we created a very simple customlogin.aspx page.
protected override void OnLoad(EventArgs e)
Response.Write(“This is from the onload event”);
<asp:login id=”login” runat=”Server” />
Once this was done then we tested the page out and everything worked. Now all that is left to do, is to brand the page.
Remember since this page (customlogin.aspx) is living in the _layouts directory, it’s best to create a feature from your custom master page, That way pointing to the style sheet and any images, used in your page, is simplified.
I will update you later on the final results and any other challenges we face.