authentication - Razor Class Library Authorization inside WASM and Server - Stack Overflow

admin2025-04-21  6

I'm trying to use a Razor Class Library to reuse components between MAUI, WASM, and Server instances. In my RCL project I wish to be able to use the <AuthorizeView><Authorized> built in tags to verify a user has been authorized but if I add the packages to enable those my WASM application which consumes the RCL throws the following error.

There was no runtime pack for Microsoft.AspNetCore.App available for the specified RuntimeIdentifier 'browser-wasm'.

Obviously I could use the WebAssembly version of the package but I don't believe that will work with my Server. And eventually I'll get to MAUI and want to consume the RCL package.

转载请注明原文地址:http://www.anycun.com/QandA/1745171019a90404.html