我正在尝试授权Xamarin Forms应用程序与配置了ASP.NET AD B2C的Azure Core Blazor服务器应用程序中的SignalR集线器通信。Xamarin表单中的登录功能以及Azure Core Blazor服务器应用程序中的登录功能在ASP.NET AD B2C中工作得很好,但我无法在SignalR hub上使用Authorize。我尝试将从Azure AD B2C收到的访问令牌传递给HubConnectionBuilder,如下所示。
connection = new HubConnectionBuilder().
WithAutomatic
我正在努力保护我的blazor客户端应用程序,并遵循了的指示。
让我困惑的是这段
public override Task<AuthenticationState> GetAuthenticationStateAsync()
{
var identity = new ClaimsIdentity(new[]
{
new Claim(ClaimTypes.Name, "mrfibuli"),
}, "Fake authentication t
我已经在.NET Core3.1中设置了Blazor应用程序,并且正在实现身份验证/授权,但很明显,我对默认身份验证是如何工作的没有很好的理解。
我设置了一个"AuthorizeView“标签,如下所示,完全预料到它会失败:
<AuthorizeView Context="auth" Roles="Admin">
<Authorized>
Content
</Authorized>
<NotAuthorized>
You do not have access to this pag
在使用本地IIS和Visual的开发膝上型计算机上,一切都正常。在我通过Azure发布应用程序的服务器上,Blazor应用程序无法加载这个javascript错误
System.ArgumentException: The URI 'http://10.144.2.7/SincroADR_Api/' is not contained by the base URI 'http://10.144.2.7/SincroADR_API/'.
在Blazor客户端应用程序的index.html上,我有一个基本的url
<base href="/Sincro
在Blazor应用程序中,我想加载一个外部程序集并执行一个方法。为此,我使用Blazor模板创建了一个新的ASP.Net核心new应用程序。
然后,在Razor (将由browser/wasm编译和执行)中,我使用反射加载程序集并运行方法(基于代码)
// download external assembly from server
HttpClient client = new HttpClient();
var bytes = await client.GetByteArrayAsync("http://localhost:62633/_framework/MyCustomLib.