When I attempt to follow the many examples provided I run into a couple of problems. The latest iteration of the code looks like this;
string passwordResetToken = await _applicationUserManager.GeneratePasswordResetTokenAsync(u.Id); string code = callbackUrl + HttpUtility.UrlEncode(passwordResetToken); await _applicationUserManager.SendEmailAsync(u.Id, RESET_SUBJECT, string.Format(RESET_BODY, u.FirstName, u.LastName, code)); The password reset link looks like:
- Problem 1: If I just try to use the password reset token 'as is' I get a routing error because of the '+' sign (this appearently creates a 'double escape sequences' which is not allow by default in IIS...for what looks like good reason.)
- Problem 2:If I URLEncode(passwordResetToken) the result "code" looks good, but when I drop that into an email and click on the link it gets URLdecoded and the same error occurs...
- Problem 3: Even when I enable double escapes (in web.config) the resulting URL gets parsed in such a way that it won't get routed back to the account controller correctly.
I'm not finding anybody else complaining about this, so I figure I have missed something foolish...but I can not find it..
account/reset/Jn4X1....doesaccount/reset?token=Jn4X1....work withoutUrlEncode()?