Error while using OPENID and .NET Core - Corelation failed

nitin pawar 11 Reputation points
2021-09-30T09:34:06.837+00:00

I am using .NET Core MVC application. The user is authenticated by microsoft azure SSO. This application works fine locally and when accessed from within the deployed server. However, when the same application is accessed from outside the deployed server the below error is being thrown.

from the application error logs :
remote server failed event..
Correlation failed.

from eventviewer

Category: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware
EventId: 1
RequestId: 800010f2-0000-fe00-b63f-84710c7967bb
RequestPath: /signin-oidc
SpanId: |29ac2ee8-4270798e54554cbb.
TraceId: 29ac2ee8-4270798e54554cbb
ParentId:

An unhandled exception has occurred while executing the request.

Exception:
System.Exception: An error was encountered while handling the remote login.
---> System.Exception: Correlation failed.
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Fidelity_Ria.Startup.<>c.<<Configure>b__6_0>d.MoveNext() in D:\Projects\FidelityDSR\Fidelity-Ria\Startup.cs:line 158
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,077 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Ankit Shrestha 1 Reputation point
    2022-04-13T05:48:49.497+00:00

    I am facing the same issue but in different environment (Ubuntu 18.04 server, nginx as reverse proxy). I have three dotnet services running in the server but one service requires to connect to other service where this error occurs, I have redirected all the traffic to https as recommended from most of the forums but no luck yet