Web-api giving exception on clicking Dashboard in Blazor frontend
Sarmadjavediqbal opened this issue · 3 comments
any solutions??? s’il vous plaît
Not sure, but it could be related to this:
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.