locked
Add custom code to FBA Forms RRS feed

  • Question

  • Hi,

       I would like add some custom code to /_forms/defaults.aspx in INDENTITYMODEL directory. I am using FBA Authentication provider and I would like add custom section in this defualt.aspx, for example same text under Login Button.

    Is it possible to change this in this file because I modified this file and save but I don't see any change to be happened.

    P.S. I don't need custom login page but use this one standard in FBA

    Thanx for any help!

    Friday, November 18, 2011 2:28 PM

Answers

All replies

  • You should not modify this OOTB page, it may break functionality in other apps hosted on the same farm or any future upgrades or patches from Microsoft may overwrite your changes. So doing a change in OOTB file is highly discouraged.

    If you need a custom sign-in page, you need a create your own page which derives from FormsSignInPage. You can use the following link for creating a custom login page http://blogs.msdn.com/b/kaevans/archive/2010/07/09/creating-a-custom-login-page-for-sharepoint-2010.aspx.

    Next time please post your SharePoint 2010 questions in SharePoint 2010 forum http://social.technet.microsoft.com/Forums/en-US/sharepoint2010general/threads


    Aravind http://aravindrises.blogspot.com
    • Marked as answer by Pengyu Zhao Friday, November 25, 2011 6:53 AM
    Friday, November 18, 2011 5:24 PM
  • I have a related question. If you are using multiple authentication methods, and need to modify multiple login pages (one for each auth type) is there a way to do this without backing up and modifying the default file on the file system.

    I have an environment where the users first get to the _login page where they select an authentication provider.  This page is located on the file system at 

    C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IDENTITYMODEL\LOGIN

    I've been able to customize this page by using Visual Studio and deploying a farm solution. So far so good.

    On this page the user selects either 'Windows Authentication' or "Forms Authentication"

    For "Windows Authentication" a login form pops up.  Great.

    For "Forms Authentication" the user is taken to another page with a url of the form

    https://sharepoint.mydomain.com/_forms/default.aspx

    However, I have learned that editing the file in C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IDENTITYMODEL\FORMS does not impact the render of this page.

    Per the above I checked in c:\inetpub\wwwroot\wss\VirtualDirectories\portno\_forms and editing that file DOES modify the look of the page rendered at https://sharepoint.mydomain.com/_forms/default.aspx

    Because we are using the _login page to let the user select the authentication type, my understanding is that must remain the "default login page" and therefore I can't use that parameter to point to a custom page.

    Most answers around this topic suggest changing that parameter through the Web App UI or web.config, but I don't think it applies in this case.

    So my question is, if you are using multiple authentication methods, and need to modify multiple login pages (one for each auth type) is there a way to do this without backing up and modifying the default file.  If so how?  Thanks!

    Wednesday, January 25, 2017 2:55 PM