Camel case session gone

Hi,

Since 5.14 whenever we retrieve the session, the propertynames which belong to AuthUserSession have become PascalCased, the props belonging to our custom session remain camelCased.

This appears to be changing the serialisation behaviour

Indeed on our custom session, changing

[DataMember]
public string Prop1 {get; set;}

to

[DataMember(Name = nameof(Prop1)]
public string Prop1 {get; set;}

has the same effect. Any ideas?

We decided maintaining predictable serialization of the authenticated session was important to avoid issues trying to deserialize it with different configurations.

Since camelCase is the default in .NET Core I could force it to use camelCase instead, will that suffice?

We’re still using .net 4.72, if there’s something I can do to avoid you modding I will?

The behavior needs to be constant, best I could to was change it to camelCase for ASP .NET Core to follow the default casing in each platform.

Only real option is to copy the existing AuthUserSession and remove Name from [DataMember] from your local modified copy.

thanks we’ll give that a go

1 Like

I’ve since reverted this behavior of using hard-coded names in the just released v6.0.2 on NuGet as there were a couple of reported issues. Sorry for the inconvenience.