You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
System.InvalidOperationException: The AuthorizationPolicy named: 'Csla:CreateObject|Shared.Customer, Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' was not found.
at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData)
at Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.IsAuthorizedAsync(ClaimsPrincipal user)
at Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Cannot access a disposed object.
Were there any configuration settings changed or something I am missing that would cause this error?
Version and Platform
CSLA version: 5.2.0
OS: Windows
Platform: Blazor
The text was updated successfully, but these errors were encountered:
I'd recommend looking through the book and ProjectTracker samples. I updated them over the past couple days and am not seeing this issue.
A lot of Blazor packages changed in the last couple previews, and for sure in client-side Blazor it is now necessary to explicitly call AddOptions during startup.
The BIG THING is that, for client-side Blazor, the private static method used to initialize per-type rules must now be public static, because otherwise the linker optimizes the method away during the build process.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Question
I have several "AuthorizeView Policy=" statements in my razor pages the utilize the CslaPolicy.GetPolicy as such
@using Csla.Rules ... <AuthorizeView Policy="@(CslaPolicy.GetPolicy(AuthorizationActions.CreateObject, typeof(Shared.Customer)))"> ... </AuthorizeView>
However, I am getting the following error:
System.InvalidOperationException: The AuthorizationPolicy named: 'Csla:CreateObject|Shared.Customer, Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' was not found.
at Microsoft.AspNetCore.Authorization.AuthorizationPolicy.CombineAsync(IAuthorizationPolicyProvider policyProvider, IEnumerable`1 authorizeData)
at Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.IsAuthorizedAsync(ClaimsPrincipal user)
at Microsoft.AspNetCore.Components.Authorization.AuthorizeViewCore.OnParametersSetAsync()
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Microsoft.AspNetCore.Components.Server.Circuits.RemoteRenderer: Warning: Unhandled exception rendering component: Cannot access a disposed object.
Were there any configuration settings changed or something I am missing that would cause this error?
Version and Platform
CSLA version: 5.2.0
OS: Windows
Platform: Blazor
The text was updated successfully, but these errors were encountered: