+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Changing /SiteFinity/Login.aspx

Changing /SiteFinity/Login.aspx

7 posts, 0 answered
  1. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    30 Mar 2010
    Link to this post
    I would like to change the SiteFinity/Login.aspx page for two reasons...first because it makes it harder for people to find it and start trying to attack my backend. Secondly I am running into some certain situations that I am not able to track down where my users are getting shown the SiteFinity login instead of my own (even though the web.config has no reference to the SiteFinity login.

    How can I change this and yet ensure that it wont break the backend of SiteFinity?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    30 Mar 2010
    Link to this post
    Hi Armysniper,

    This is not supported out of the box, but you could take a look at this forum post by Sitefinity Team.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Armysniper
    Armysniper avatar
    126 posts
    Registered:
    03 Mar 2005
    30 Mar 2010
    Link to this post
    How is this supposed to help? The problem that I am running into is that for some reason users are getting redirected to the SiteFinity login page when they should not and we cannot reproduce it but our customers call in and tell us from time to time that this happens to them. I tried to search through the code for references to the SiteFinity login but cannot find them. Our login page is setup in IIS to only be displayed via HTTPS (as suggested in these forums). But for some reason our users are getting redirected to the SiteFinity login page and we cannot reproduce it outside of our environment. I am beggining to think this is internal code of Site Finity that is doing this as we have no code that references it in our controls. My idea to get around this was to rename it to SFLogin.aspx and create Login.aspx as a redirect to the home site. But that breaks the backend.

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    31 Mar 2010
    Link to this post
    Hi Armysniper,

    Here is a list with the files where we reference Stiefinity/Login.aspx page.

    • Sitefinity\Admin\Admin.master.cs(39):       
    Response.Redirect("~/Sitefinity/Login.aspx");

    • Sitefinity\nopermissions.aspx(20):      
    <p><a href="<%= ("/" == Request.ApplicationPath ? "" : Request.ApplicationPath) %>/Sitefinity/Login.aspx">Sign in as a different user</a> or contact your administrator.</p>

    • web.config(151):    
     <forms name=".ASPNET" loginUrl="~/sitefinity/login.aspx" protection="All" timeout="1440" path="/"/>

    • Sitefinity\Admin\Admin.master.cs(39):      
     Response.Redirect("~/Sitefinity/Login.aspx");


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Stephen Long
    Stephen Long avatar
    20 posts
    Registered:
    29 Sep 2009
    02 Jun 2010
    Link to this post
    Hi Ivan.

    I have modified all of the references you listed.  I have them pointing to ~/Login.aspx.

    Yet, when I browse to sitefinity/admin/default.aspx as an annonymous user, I still get redirected to sitefinity/login.aspx.  Is there something else I am missing?

    Thanks,
    Stephen

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    03 Jun 2010
    Link to this post
    Hello Stephen Long,

    You are explicitly making a request to the backend - sitefinity/admin/default.aspx. This request is handled by CmsHttpModule which sets the login url to Sitefinity/Login.aspx. You could crate a custom HttpModule that inherits from CmsHttpModule and override RedirectToLogin() which sets the login url.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Stephen Long
    Stephen Long avatar
    20 posts
    Registered:
    29 Sep 2009
    03 Jun 2010
    Link to this post
    Thanks Ivan,

    That does the trick.  In the overridden method, I just used the forms authentication redirection method and it works fine:

    protected override void RedirectToLogin()
    {
         FormsAuthentication.RedirectToLoginPage();
    }

    -Stephen
Register for webinar
7 posts, 0 answered