fullstackhero / blazor-wasm-boilerplate

Clean Architecture Boilerplate Template for .NET 6.0 Blazor WebAssembly built for FSH WebAPI with the goodness of MudBlazor Components.

Home Page:https://fullstackhero.net/blazor-webassembly-boilerplate/general/getting-started/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Web-api giving exception on clicking Dashboard in Blazor frontend

Sarmadjavediqbal opened this issue · comments

Screenshot 2023-04-28 165925

Screenshot 2023-04-28 165800

Web-api is throwing exception after clicking Dashboard in frontend (blazor-wasm).

any solutions??? s’il vous plaît

Not sure, but it could be related to this:

jbogard/MediatR#701

I found the solution. The definition of the Interface (IPipelineBehavior<TRequest, TResponse>) is:

Task Handle(TRequest request, CancellationToken cancellationToken, RequestHandlerDelegate next);

where as the class ValidationBehavior was implementing the above definition in wrong sequence as below:

Task Handle(TRequest request, RequestHandlerDelegate next, CancellationToken cancellationToken)

The definitions in both lines look the same but work differently. So I switched these two and it works just fine. Thanks @MikaelHild again for guiding.

It took a while but a little focus on the little details can save you hours of research.