question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to Base64UrlEncode in Blazor WebAssembly client now that Microsoft.AspNetCore.WebUtilities has been deprecated?

See original GitHub issue

I just spotted that NuGet in Visual Studio is saying that package Microsoft.AspNetCore.WebUtilities at 2.2.0 is deprecated.

I have this package installed into my Blazor WebAssembly Client project because I need to call method WebEncoders.Base64UrlEncode.

If I should remove Microsoft.AspNetCore.WebUtilities, how should my Client project perform base64 URL encoding?

(I note that my Server project is still able to call WebEncoders methods, and doesn’t have the deprecated package installed anyway.)

This resource says that WebEncoders.Base64UrlEncode lives in package Microsoft.AspNetCore.App.Ref but NuGet tells me that I shouldn’t install that package as it’s an internal thing.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:22 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
Bellarmine-Headcommented, May 9, 2023

@javiercn - ooh! I removed the deprecated package from my Blazor client project just now, and discovered that it’s also using https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.webutilities.queryhelpers?view=aspnetcore-7.0

So this ticket shouldn’t be closed in favour of https://github.com/dotnet/runtime/issues/1658 since that only deals with base64 URL encoding.

Can you re-open?

0reactions
wtgodbecommented, May 17, 2023
Read more comments on GitHub >

github_iconTop Results From Across the Web

WebEncoders.Base64UrlEncode Method
Encodes input using base64url encoding.
Read more >
Migrating the deprecated Microsoft.AspNetCore.Http. ...
I have a .NET 7 Blazor helper library which has been referencing HttpContext from the Microsoft.AspNetCore.Http.Abstractions (2.2.0) nuget.
Read more >
ASP.NET Core Blazor WebAssembly additional security ...
This article describes additional security scenarios for Blazor WebAssembly apps. Attach tokens to outgoing requests.
Read more >
Untitled
Dotnet core assembly version Version vs VersionSuffix vs PackageVersion: What do … Web6 thg 4, 2017 · I'm trying to figure out how...
Read more >
Untitled
NET project How to Base64UrlEncode in Blazor WebAssembly client now that ... NET CLI Microsoft Learn dotnet list package command - .NET CLI...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found