tags:

views:

280

answers:

2

I have FBA (form_based_authentication) on my SP site, so thi first login site is login.aspx. Now there is following problem: users are coming from another site on the sharepoint. Herefor they using some kind of private key. The Public key is on the sharepoint webserver.

What I´m trying to do now is to modify the login.aspx with following example code I get from the creator of this mechanism, but I dont really know where to paste ist:

"<% String ct = Request.Params["ct"]; String sp = Request.Params["sp"]; ctf.TicketEvaluator e = new ctf.TicketEvaluator(Server.MapPath("keys"), 0); String payload = e.evaluateClassicTicketAsString(ct,sp,300000000,"lohn"); %> This was your payload: <%= payload %>
"

As a standalone .NET project it works fine, but I don´t have any idea how to put it into login.aspx.

Thanks a lot, fiuman007

A: 

Hi fiuman007

The quick and very dirty method is to modify the login.aspx directly it's located on the SharePoint server(s) as:

"c:\Program Files\Common Files\Microsoft Shared\Web Server Extension\12\TEMPLATE\LAYOUTS\login.aspx"

The quick and dirty method is to take a copy of the file above into a new subdirectory you make and make the changes here and then point to this new login page in the web.config(s)

The right solution is to make a feature with the web.config modification and put it into a solution with the login page. It'll get the same end result as method two but in a nice repeatable way which can put into Source Control

Per Jakobsen
Thank you for response. I think I will copy login.aspx in login2.aspx and redirect in web.config on this.
fiuman007
A: 

Create your own Login.aspx and then configure the web.config to use that page as the default login page for FBA. Never change out of the box Sharepoint files in the sharepoint 12-hive on the harddrive.

ALWAYS create your own custom version and point sharepoint to your customized page. this goes pretty much applies any time you think about modifying sharepoint 12-hive files.

Don't take the easy way out, you will end up in maintenance hell.

Colin
I will do that. Thank you!
fiuman007
cool! P.S. Maybe it would be nice to update your post when everything's working :-D.
Colin