开发者

SharePoint: insert ASP code into login.aspx

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.

Wh开发者_高级运维at 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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜