tomasfabian / Joker

Reactive data changes from SQL server to .NET clients. SqlTableDependency extensions, Joker.OData, Joker.Redis, Joker.MVVM and ksqlDB LINQ provider
MIT License
69 stars 23 forks source link

[Joker.OData] - UseAuthorization throws InvalidOperationException (SignalR hub) #8

Closed tomasfabian closed 4 years ago

tomasfabian commented 4 years ago

UseAuthorization should be called between UseRouting and UseEndpoints:

An unhandled exception has occurred while executing the request. System.InvalidOperationException: Endpoint /dataChangesHub/negotiate contains authorization metadata, but a middleware was not found that supports authorization. Configure your application startup by adding app.UseAuthorization() inside the call to Configure(..) in the application startup code. The call to app.UseAuthorization() must appear between app.UseRouting() and app.UseEndpoints(...). at Microsoft.AspNetCore.Routing.EndpointMiddleware.ThrowMissingAuthMiddlewareException(Endpoint endpoint) at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) at Joker.OData.Middleware.Logging.ErrorLoggerMiddleware.Invoke(HttpContext context) in C:\Github\SqlTableDependency.Extensions\Joker.OData\Middleware\Logging\ErrorLoggerMiddleware.cs:line 23 at Microsoft.AspNet.OData.Batch.ODataBatchMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

tomasfabian commented 4 years ago

Fixed in version Joker.OData 1.4.1