HTTP Error 404.11 Passing Account Activation. Token by querystring

I am trying to implement a password reset funcionallity. I am using the ASP.NET identifier.

I use UserManager.GetConfirmationTokenone that returns a token as follows:

UW / cj4xUj08kiGCntnWs7z1eUcWlyfNczH5IZfvf0ScTi4L1jgdkkus / Zb5ROJOWb% 2b1XAVRSiBUvVGnESfEyauDDa4u% 2bPDUH6D / CIpwPcFYRvLi% 2b% 2bq6f% 2bRIhKHRTsGMV0y8lXpSZ5VqySWGSSaW9kofGage / IjW4HrvONeEtA4Szov3u7HgmqEUf0yzgivJ0

Then I compose my URL and I send it by email to the registered user. The account activation URL is as follows:

http://localhost:4322/Account/Confirm/UW/cj4xUj08kiGCntnWs7z1eUcWlyfNczH5IZfvf0ScTi4L1jgdkkus/Zb5ROJOWb%2b1XAVRSiBUvVGnESfEyauDDa4u%2bPDUH6D/CIpwPcFYRvLi%2b%2bq6f%2bRIhKHRTsGMV0y8lXpSZ5VqySWGSSaW9kofGage/IjW4HrvONeEtA4Szov3u7HgmqEUf0yzgivJ0

When I click, this error occurs:
Error HTTP 404.11 - Double escape sequence issue

+4
4
0

, . , querystring.

http://localhost:4322/Account/Confirm?code=UW/cj4xUj08kiGCntnWs7z1eUcWlyfNczH5IZfvf0ScTi4L1jgdkkus/Zb5ROJOWb%2b1XAVRSiBUvVGnESfEyauDDa4u%2bPDUH6D/CIpwPcFYRvLi%2b%2bq6f%2bRIhKHRTsGMV0y8lXpSZ5VqySWGSSaW9kofGage/IjW4HrvONeEtA4Szov3u7HgmqEUf0yzgivJ0

, .

: http://blogs.msdn.com/b/webdev/archive/2014/03/20/test-announcing-rtm-of-asp-net-identity-2-0-0.aspx?PageIndex=1#comments pranav rostgi

+1

/, - . - (, base64) , ...?token=.... ,

0

, , - , :

                string code = await UserManager.GetConfirmationToken(user.Id);
                var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
                await SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking this link: <a href=\"" + callbackUrl + "\">link</a>");
0

Source: https://habr.com/ru/post/1525795/


All Articles