Sharepoint Default Sign In page should redirect to my Custom HTTP Handler test.ashx code.

I configured multiple claim authentication in sharepoint server 2013 and I need to by pass multiple authentication drop down box in the de fault Sign In page.


You may configure Form Based Authentication (see in the Authentication Providers page for the Web app in CA), and then edit the web.config file (on each WFE) to change the loginUrl property of the <forms> tag to point to your own page.

  • thanks for your reply, it is working fine but I am redirecting to my custom HTTP handler spsxyz/_layouts/TestClaimhandler/Testhand.ashx Using the below code, I am not getting Internet Explorer user name. It is throwing NULL object reference error SPWeb site = SPContext.Current.Web; SPSecurity.RunWithElevatedPrivileges(delegate() { using (SPSite ElevatedsiteColl = new SPSite(siteColl.ID)) { using (SPWeb ElevatedSite = ElevatedsiteColl.OpenWeb(site.ID)) { string currUser = site.CurrentUser; //not the ElevatedSite.CurrentUser } } });
    – karthi N
    Jul 26 '15 at 4:56
  • The SPContext is not initialized at this veru early stage of the request processing: you definitely cannot use it in the context of an authentication page. If your login page supports Windows authentication, you may use HttpContext.Current.User.Identity.Name to get the user name.
    – Evariste
    Jul 26 '15 at 5:22
  • the HttpContext.Current.User.Identity.Name is throwing null value, I am using in the below code public partial class TestHand:IHttphandler{Public void ProcessRequest(HttpContext context) { context.Response.write(HttpContext.Current.User.Identity.Name) }
    – karthi N
    Jul 26 '15 at 8:08
  • is there any other way to get Internet Explore logged user domain name
    – karthi N
    Jul 26 '15 at 8:10
  • If I disabled Anonymous Authentication in IIS then I get Domain\\UserName, I configured ABC AD FS user Claims Based authentication in my sharepoint Page, If ABC User access the Custom HTTP Handler then it is prompting to XYZ sharepoint domain, how can I get other domain and user name when they login IE
    – karthi N
    Jul 26 '15 at 8:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.