Introduction
Today I will tell you how to Create a Custom Login Page for FBA in SharePoint 2010. While as of late assisting my client with their Sharepoint 2010 FBA design, I went over an obviously baffling part of utilizing a custom ASP.NET form to handle the validation. Amid the advancement of custom login page, i came to realize that a large portion of documentation that is accessible on this theme, all that is needed is to give a URL to your structure in Central Administration. The inquiry is do you think it is just conceivable approach to do this by giving URL in Central Admin? The answer is NO. It is conceivable. Lets have some Tea and prepared to ride on this.
Foundation:
It would be incredible if things worked so effortlessly as simply hitting in a URL and the back-end wiring itself up naturally. Lets accept you have an essential ASP.NET form and you’ve arranged it in this way with standard control alongside expecting that you’ve set up the Asp.net Membership SQL database, designed the Membership and Role suppliers, rolled out the vital improvements in the web application, Secure Token Service and Central Admin web.configs and gone into Central Administration to arrange Forms Based confirmation (FBA in Sharepoint 2010),you’d find that all your endeavors would have been for nix – This structure would submissively approve your qualifications against the Membership database and afterward savagely provided for you a lapse when the structure endeavored to redirect you /_layouts/Authenticate.asp
Why this blunder comes? Reason:
A vanilla ASP.NET form inherits from System.web.ui.page – you are no one worth mentioning the extent that Club Sharepoint 2010 is concerned. Since an ASP.NET form has no clue how to make the obliged cases based validation token to pass along to Sharepoint to say that you truly are on “the rundown” and that you know this gentleman inside who can guarantee for you.
Arrangement:
There is no API documentation on this. For this situation, to set your login structure page to inherit from the same class that the out-of-the-case Sharepoint FBA login structure executes: Microsoft.sharepoint.identityprovider.formssigninpage (you can discover this page in the/_forms sub organizer of any Sharepoint 2010 web application that has been set for FBA – 11574 for my situation.
Presently everyonce thinks about polymorphism, we can get to all the Sharepoint FBA/Claims Auth token creation goodness out-of-the-case FBA structures get “free of charge” utilizing the enchantment of polymorphism.
You can utilize your own altered expert page likewise in which your modified client control will be incorporated (I have made an expert page with name “Masterforcustomlogin” which contains tweaked html according to my prerequisite).
You can make an organizer likewise in _forms/ (Basically it requires to store pictures if your login page has)
By doing this, you can now adjust your prior FBA login structures to accommodate with the cases based auth necessities for Sharepoint 2010.
My Login page resembles this now (in the wake of performing above steps):
Once you enter your credentials, you will be authenticated with your membership providers and able to logged in.
Important:
During this development, I observed one thing – When you enter your sharepoint site url into address bar it looks like :
You can see “http://kirti-p:11574/_login/default.aspx?ReturnUrl=%2f_layouts%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F”. This _login folder is available in virtual directory of sharepoint site itself. When you select “Forms Authentication” from drop down this url will be changed and looks like:
It says, while you are accessing Forms Authentication option it refere different master page.
You have to change master page entry accordingly. Thats it for custom login page.