Error when logging in

Hi,
We got an exception when logging in in backoffice.
Self referencing loop detected for property ‘subject’ with type ‘System.Security.Claims.ClaimsIdentity’. Path ‘claims.$values[0]’.

After restart login works ok again. What could cause this error?

Litium version: 7.2.1

full error:
Server Error in ‘/’ Application.
Self referencing loop detected for property ‘subject’ with type ‘System.Security.Claims.ClaimsIdentity’. Path ‘claims.$values[0]’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Newtonsoft.Json.JsonSerializationException: Self referencing loop detected for property ‘subject’ with type ‘System.Security.Claims.ClaimsIdentity’. Path ‘claims.$values[0]’.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[JsonSerializationException: Self referencing loop detected for property ‘subject’ with type ‘System.Security.Claims.ClaimsIdentity’. Path ‘claims.$values[0]’.]
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CheckForCircularReference(JsonWriter writer, Object value, JsonProperty property, JsonContract contract, JsonContainerContract containerContract, JsonProperty containerProperty) +722
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(JsonWriter writer, Object value, JsonContainerContract contract, JsonProperty member, JsonProperty property, JsonContract& memberContract, Object& memberValue) +455
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +1170
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeList(JsonWriter writer, IEnumerable values, JsonArrayContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +805
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty) +1170
Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType) +399
Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType) +1072
Newtonsoft.Json.JsonConvert.SerializeObjectInternal(Object value, Type type, JsonSerializer jsonSerializer) +237
Litium.Application.Runtime.ApplicationJsonConverterImpl.ConvertObjectToJson(Object item, Type type) +92
Litium.Application.Auditing.AuditLoggerServiceImpl.GetOrAddTransactionItem(Guid entitySystemId) +523
Litium.Application.Auditing.AuditLoggerServiceImpl.CreateReadEntry(Guid entitySystemId, Object args) +90
Litium.Application.Auditing.AuditServiceImpl.CreateReadEntry(IEnumerable1 systemIds) +278 Litium.Application.Security.AuthenticationServiceImpl.SignIn(Guid systemId, String username) +225 Litium.Application.Security.<>c__DisplayClass10_0.<PasswordSignIn>b__0(LitiumDbContext db) +2898 Litium.Application.Data.DbContextExtension.ExecuteInDbContext(IServiceProvider serviceProvider, Func2 loaderFunc) +97
Litium.Web.Security.AuthenticationServiceDecorator.PasswordSignIn(String username, String password, String newPassword) +23
LitiumStudio_Default.c_buttonLogin_Click(Object sender, EventArgs e) in C:\SysData\vsts-agent1_work\2\s\Src\Web\Litium\Default.aspx.cs:163
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +141
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5445

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0

This happened for us also in our test server for a while ago but for the moment we are not sure on the cause. We will update this thread if we find out the issue.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.