FBA SP 2013 calling ChangePassword page from SP login page


I added the pack at root site level and am trying to call a custom ChangePassword page I created or the layout ChangePassword page from my login page client side script that checks for password expiry and it does not seem to render anything besides a blank page. Suggestions?


You sent me the following code:

int daysSincePwdChange = Convert.ToInt32(DateTime.Now.Subtract(usrInfo.LastPasswordChangedDate).TotalDays);
					FormsAuthentication.RedirectFromLoginPage (signInControl.UserName, false);
					FormsAuthentication.SetAuthCookie(signInControl.UserName, false);
                                        // Response.Redirect("~/FBA-Admin/SitePages/ChangePassword.aspx");

I think there’s an issue with the redirect url, try using this:http://mysharepointwork.blogspot.com/2010/09/redirect-page-in-sharepoint.html


Chris, still getting a blank page with the possibility of the password change web part being invisible using the SPUtility redirect. I am setting the auth cookie so I should be logged in.


First check that you are being redirected to the correct url. Check it against the url you are redirected to when you use the change password menu item. Code for generating the url is here:

Second, looking at the code some more, I don’t think you’re authenticating correctly. See line 320 here:

The FormsAuthentication class doesn’t work with SP 2010+. SharePoint has it’s own claims authentication logic.


I have this on the client side script now : SPUtility.Redirect(“FBA/ChangePassword.aspx”, SPRedirectFlags.Static | SPRedirectFlags.RelativeToLayoutsPage, HttpContext.Current);


Chris, line 320 fixed it. You were right as usual :grinning:. Thanks a ton!