Gowtham

Gowtham

  • NA
  • 516
  • 38.4k

Custom Sign in URL not loading for sharepoint site

May 31 2019 9:11 AM
Hi ,
 
I am working on FBA authentication for sharepoint on permises.I had created a application page for custom login and deployed on layout 15 hive.I have configured the FBA for the extended web application.For custom sign in url I have mapped like "~/_layouts/15/sample/default.aspx". While page loading its not landing on custom url instead its loads on default url. My requirement is to land on custom url while loading my sharepoint site. But Its working fine while loading manual like
 
"http://mysite:2222/_layouts/15/sample/login.aspx?ReturnUrl=%2f_layouts%2f15%2fAuthenticate.aspx%3fSource%3d%252F&Source=%2F"
 
Issue is when I load http://mysite:2222/ is not landing on custom url it loads default url.
 
sample.aspx
  1. <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>  
  2. <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>  
  3. <%@ Assembly Name="Microsoft.SharePoint.IdentityModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>  
  4. <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>  
  5. <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>  
  6. <%@ Import Namespace="Microsoft.SharePoint" %>  
  7. <%@ Assembly Name="Microsoft.Web.CommandUI, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>  
  8. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewLogin.aspx.cs" Inherits="Sample.Layouts.Sample.NewLogin" MasterPageFile="~/_layouts/15/errorv15.master" %>  
C# code.
  1. using System;  
  2. using Microsoft.SharePoint;  
  3. using Microsoft.SharePoint.WebControls;  
  4. using Microsoft.SharePoint.IdentityModel.Pages;  
  5. namespace Sample.Layouts.Sample  
  6. {  
  7. public partial class NewLogin : System.Web.UI.Page  
  8. {  
  9. protected void Page_Load(object sender, EventArgs e)  
  10. {  
  11. }  
  12. }  
  13. }  
Regards
Gowtham.

Answers (1)