Tip: customize CRM2011 ADFS login page to behave like CRM 4 IFD login page RRS feed

  • Question

  • 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 )
                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?

    Thursday, April 19, 2012 8:51 PM