My issue is fixed. Thanks
This is the logs for auth server.
[13:49:38 INF] AUDIT LOG: [500: GET ] /connect/token
- UserName - UserId : -
- ClientIpAddress : ::ffff:10.224.1.60
- ExecutionDuration : 3
- Actions:
- Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync (1 ms.)
{}
- Exceptions:
- The OpenID Connect request cannot be retrieved.
System.InvalidOperationException: The OpenID Connect request cannot be retrieved.
at Volo.Abp.OpenIddict.Controllers.AbpOpenIdDictControllerBase.GetOpenIddictServerRequestAsync(HttpContext httpContext)
at Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
[13:49:38 ERR] An unhandled exception has occurred while executing the request.
System.InvalidOperationException: The OpenID Connect request cannot be retrieved.
at Volo.Abp.OpenIddict.Controllers.AbpOpenIdDictControllerBase.GetOpenIddictServerRequestAsync(HttpContext httpContext)
at Volo.Abp.OpenIddict.Controllers.TokenController.HandleAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpOpenIddictMiddlewareExtension.<>c__DisplayClass0_0.<<UseAbpOpenIddictValidation>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Prometheus.HttpMetrics.HttpRequestDurationMiddleware.Invoke(HttpContext context)
at Prometheus.HttpMetrics.HttpRequestCountMiddleware.Invoke(HttpContext context)
at Prometheus.HttpMetrics.HttpInProgressMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|8_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
[13:49:38 INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed
[13:49:38 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'
[13:49:38 INF] Route matched with {action = "Index", controller = "Error", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] Index(Int32) on controller Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared).
[13:49:38 INF] Executing ViewResult, running view ~/Views/Error/500.cshtml.
[13:49:38 INF] Executed ViewResult - view ~/Views/Error/500.cshtml executed in 2.6941ms.
[13:49:38 INF] Executed action Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared) in 3.489ms
[13:49:38 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Controllers.ErrorController.Index (Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared)'
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/connect/token - - - 500 - text/html;+charset=utf-8 13.1326ms
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/LeptonX.Global.9325FB768F9C0093DC4664395D730921.css?_v=638133564390389602 - -
[13:49:38 INF] The file /__bundles/LeptonX.Global.9325FB768F9C0093DC4664395D730921.css was not modified
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/LeptonX.Global.9325FB768F9C0093DC4664395D730921.css?_v=638133564390389602 - - - 304 - text/css 0.3928ms
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638133564388112886 - -
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ApplicationConfigurationScript - -
[13:49:38 INF] The file /__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css was not modified
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/Views.Error.DefaultErrorComponent.default.F15FCDEA56EC024E1CDCD86CA6B586D8.css?_v=638133564388112886 - - - 304 - text/css 0.2583ms
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/LeptonX.Global.DD44B0ECF605910A5B8FAD560D306DDE.js?_v=638133564395674662 - -
[13:49:38 INF] The file /__bundles/LeptonX.Global.DD44B0ECF605910A5B8FAD560D306DDE.js was not modified
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/__bundles/LeptonX.Global.DD44B0ECF605910A5B8FAD560D306DDE.js?_v=638133564395674662 - - - 304 - application/javascript 0.1328ms
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ApplicationLocalizationScript?cultureName=en - -
[13:49:38 INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed
[13:49:38 INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed
[13:49:38 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationLocalizationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController (Volo.Abp.AspNetCore.Mvc).
[13:49:38 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc).
[13:49:38 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
[13:49:38 INF] Executed action Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 5.6876ms
[13:49:38 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.Localization.AbpApplicationLocalizationScriptController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ApplicationLocalizationScript?cultureName=en - - - 200 53421 application/javascript 8.0021ms
[13:49:38 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ServiceProxyScript - -
[13:49:38 INF] Identity.Application was not authenticated. Failure message: Unprotect ticket failed
[13:49:38 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Route matched with {area = "Abp", action = "GetAll", controller = "AbpServiceProxyScript", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult GetAll(Volo.Abp.AspNetCore.Mvc.ProxyScripting.ServiceProxyGenerationModel) on controller Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController (Volo.Abp.AspNetCore.Mvc).
[13:49:38 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
[13:49:38 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 7.3815ms
[13:49:38 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ApplicationConfigurationScript - - - 200 5306 application/javascript 12.4091ms
[13:49:38 INF] Executing ContentResult with HTTP Response ContentType of application/javascript
[13:49:38 INF] Executed action Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc) in 1.1703ms
[13:49:38 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ProxyScripting.AbpServiceProxyScriptController.GetAll (Volo.Abp.AspNetCore.Mvc)'
[13:49:38 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/Abp/ServiceProxyScript - - - 200 54 application/javascript 4.1264ms
AdministrationService logs seems fine, no error
[08:43:54 INF] Request starting HTTP/1.1 GET http://nxp-staging-administration-service-v1.nxp-staging.svc.cluster.local/api/abp/application-configuration?includeLocalizationResources=false - 0
[08:43:54 INF] CORS policy execution successful.
[08:43:54 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[08:43:54 INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
[08:43:54 WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.
[08:43:54 INF] Executing ObjectResult, writing value of type 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto'.
[08:43:54 INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc) in 5.7676ms
[08:43:54 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[08:43:54 INF] Request finished HTTP/1.1 GET http://nxp-staging-administration-service-v1.nxp-staging.svc.cluster.local/api/abp/application-configuration?includeLocalizationResources=false - 0 - 200 - application/json;+charset=utf-8 8.5298ms
[08:43:54 INF] Request starting HTTP/1.1 GET http://nxp-staging-administration-service-v1.nxp-staging.svc.cluster.local/api/abp/application-localization?cultureName=en&onlyDynamics=false - 0
[08:43:54 INF] CORS policy execution successful.
[08:43:54 INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
[08:43:54 INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationLocalization", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationLocalizationRequestDto) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationLocalizationController (Volo.Abp.AspNetCore.Mvc).
Auth Server Logs:
[08:48:36 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/.well-known/openid-configuration - - - 200 2102 application/json;charset=UTF-8 1.0450ms
[08:48:37 INF] Request starting HTTP/1.1 OPTIONS http://nxp-authserver.order-line.co.uk/.well-known/jwks - -
[08:48:37 INF] CORS policy execution successful.
[08:48:37 INF] Request finished HTTP/1.1 OPTIONS http://nxp-authserver.order-line.co.uk/.well-known/jwks - - - 204 - - 0.3026ms
[08:48:37 INF] Request starting HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/.well-known/jwks - -
[08:48:37 INF] CORS policy execution successful.
[08:48:37 INF] Request finished HTTP/1.1 GET http://nxp-authserver.order-line.co.uk/.well-known/jwks - - - 302 0 - 2.7687ms
From the browser, Its requesting to https://nxp-authserver.order-line.co.uk/.well-known/jwks but in the log, the URL of jwks is without the https. Although http://nxp-authserver.order-line.co.uk/.well-known/openid-configuration return 200 status while http://nxp-authserver.order-line.co.uk/.well-known/jwks return 204 http status.
I can successfully login in https://nxp-authserver.order-line.co.uk/ but not able to login from the angular.
I have configured the abp microservice on the Azure Kubernetes. When I open the angular project, I am getting the below error in console.
The OpenId configuration
Authserver OpenId configuration
I have integrated the singalr in administration microservice.
private hubConnection: signalR.HubConnection
public startConnection = () => {
this.hubConnection = new signalR.HubConnectionBuilder()
.withUrl('https://localhost:44367/signalr-hubs/change-detection')
.build();
console.log(this.hubConnection, 'hub connection');
this.hubConnection
.start()
.then(() => console.log('Connection started'))
.catch(err => console.log('Error while starting connection: ' + err));
this.hubConnection.on('BroadcastMessage', (data) => {
console.log(data);
});
}
constructor(){
this.startConnection();
}
I have put the above code in the appcomponent.ts file. The above code is working fine and when I send the signal from the administration microservice, I receive the message on "BroadcastMessage". I have used the administration service URL "https://localhost:44367".
Now I don't want to use the administration service URL, I want to use the gateway URL https://localhost:44325 so I configured the ocelot.json file as below.
{
"ServiceKey": "Administration Service",
"DownstreamPathTemplate": "/signalr-hubs/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44367
}
],
"UpstreamPathTemplate": "/signalr-hubs/{everything}",
"UpstreamHttpMethod": [ "Put", "Delete", "Get", "Post" ]
},
{
"DownstreamPathTemplate": "/ws",
"UpstreamPathTemplate": "/",
"DownstreamScheme": "ws",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44367
}
]
}
When I use the above code, I am getting the below error in console.
[2023-01-17T11:47:29.510Z] Information: WebSocket connected to wss://localhost:44325/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg.
Utils.js:141 [2023-01-17T11:47:29.513Z] Error: Connection disconnected with error 'Error: Server returned handshake error: Handshake was canceled.'.
log @ Utils.js:141
_stopConnection @ HttpConnection.js:396
transport.onclose @ HttpConnection.js:334
_close @ WebSocketTransport.js:144
webSocket.onmessage @ WebSocketTransport.js:84
wrapFn @ zone.js:766
invokeTask @ zone.js:406
onInvokeTask @ core.mjs:26218
invokeTask @ zone.js:405
runTask @ zone.js:178
invokeTask @ zone.js:487
invokeTask @ zone.js:1661
globalCallback @ zone.js:1692
globalZoneAwareCallback @ zone.js:1725
Show 14 more frames
app.component.ts:22 Error while starting connection: Error: Server returned handshake error: Handshake was canceled.
If I integrated the singalr into the web gateway then I am getting the ocelot configuration not found error.
This is the administration service log
[administration-service_786370b9-c]: [17:17:09 INF] Request starting HTTP/1.1 POST https://localhost:44367/signalr-hubs/change-detection/negotiate?negotiateVersion=1 - 0
[administration-service_786370b9-c]: [17:17:09 INF] CORS policy execution successful.
[administration-service_786370b9-c]: [17:17:09 INF] Executing endpoint '/signalr-hubs/change-detection/negotiate'
[administration-service_786370b9-c]: [17:17:09 INF] Executed endpoint '/signalr-hubs/change-detection/negotiate'
[administration-service_786370b9-c]: [17:17:09 INF] Request finished HTTP/1.1 POST https://localhost:44367/signalr-hubs/change-detection/negotiate?negotiateVersion=1 - 0 - 200 316 application/json 1.8707ms
[administration-service_786370b9-c]: [17:17:09 INF] Request starting HTTP/1.1 GET https://localhost:44367/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - 0
[administration-service_786370b9-c]: [17:17:09 INF] CORS policy execution successful.
[administration-service_786370b9-c]: [17:17:09 INF] Executing endpoint '/signalr-hubs/change-detection'
[administration-service_786370b9-c]: [17:17:29 INF] Executed endpoint '/signalr-hubs/change-detection'
[administration-service_786370b9-c]: [17:17:29 INF] Request finished HTTP/1.1 GET https://localhost:44367/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - 0 - 101 - - 20029.8655ms
This is the web gateway log:
[web-gateway_8b434f23-f]: [17:17:29 DBG] requestId: 0HMNOG1S5794U:00000002, previousRequestId: no previous request id, message: ocelot pipeline finished
[web-gateway_8b434f23-f]: [17:17:29 INF] Request finished HTTP/1.1 GET https://localhost:44325/signalr-hubs/change-detection?id=Oiwz6joKZs_dxyeYKdUsHg - - - 101 42 - 20035.4048ms
I am getting below error when build the project from Azure pipeline.
error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.Web.OpenIddict. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.HttpApi. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.Account.Pro.Public.Application. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
error NU1101: Unable to find package Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX. No packages exist with this id in source(s): ABP Commercial NuGet Source, nuget.org [/src/ChurchPharmacy.sln]
Failed to restore /src/apps/auth-server/src/ChurchPharmacy.AuthServer/ChurchPharmacy.AuthServer.csproj (in 27.05 sec).
https://github.com/abpframework/abp-samples/tree/master/ConcurrentLogin
But this sample is integrated with the identity server 4 and the microservice template has OpenID configuration.
I want to integrate the concurrent login feature. I downloaded the sample code from GitHub. I have a microservice template. What is the best practice to integrate the concurrent login feature, with Auth Server or Identity service or any other way?
I have microservice architecture. I have configured the blog provider in the administration microservice. I have a multi-tenancy configuration as well. I want to use different azure connection strings based on tenant configuration. I want to give the setting for the blob storage provider and the tenant can change the setting. I also want to give choices to tenants either they can use azure storage or aws storage. So basically I want blob configuration based on the settings of the tenant.