Note: Forums will be making significant UX changes to address key usability improvements surrounding search, discoverability and navigation. To learn more about these changes please visit the announcement which can be found HERE.
Tip: customize CRM2011 ADFS login page to behave like CRM 4 IFD login page

問題 Tip: customize CRM2011 ADFS login page to behave like CRM 4 IFD login page

  • giovedì 19 aprile 2012 20:51
     
     

    Just sharing a tip here...

    Notice the difference between the old and new login page:
    - CRM4 + IFD login page
      -> you can start straight away with typing your username
      -> you only need to enter your username
    - CRM2011 + ADFS
      -> you need to click on the username first
      -> you need to enter 'domainname\username'

    Modify these routines in FormsSignIn.aspx.cs (change domainname to your domain), located in C:\inetpub\adfs\ls (make a copy of the file first):

        protected void Page_Load( object sender, EventArgs e )
        {   
            Page.RegisterStartupScript("SetFocus", "<script>document.getElementById('" + UsernameTextBox.ClientID + "').focus();</script>");
        }

        protected void SubmitButton_Click( object sender, EventArgs e )
        {
            try
            {
                SignIn( @"domainname\"+UsernameTextBox.Text , PasswordTextBox.Text );
            }
            catch ( AuthenticationFailedException ex )
            {
                HandleError( ex.Message );
            }
        }

    Also got a question...

    If you logout, I want to get redirected back to the login page (like in CRM4), anyone?