Using ASP.NET Core I am receiving the following token (simplified):
String token = "Z%2F3+3Q==";
The /
is encoded using %2F
. I received the token from a URL called on the client using Angular.
I tried to decode the token using the following:
HttpUtility.UrlDecode(token)
Or
WebUtility.UrlDecode(token)
In both cases %2F
is replaced by /
, which I want, but the +
is replaced by a space, which I do not want.
How do I decode the string?
Update
The client application is sending the token encoded:
Z%2F3%2B3Q%3D%3D;
But, somehow, it seems the token in the following action:
[HttpPut("account/verify/{userId}/{token}")]
public async Task<IActionResult> VerityEmailAddress([FromRoute]AccountEmailVerifyModel model) {
}
Is transformed to:
Z%2F3+3Q==
So the +
and =
are decoded, but the /
is not.