-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Resolve serialization issue #4788
Resolve serialization issue #4788
Conversation
Using a computed property instead of a property with a backing field should be enough to avoid the serialization issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me and should resolve the issue
@bdukes thank you so much!! |
@bdukes I'm confused, I'm looking at the code for the file you changed in the main repo and it looks different that your branch. I see this:
The code you changed had an [unserializable] decoration. Also, the getter here is different. Thanks!! Jeff |
I had to remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Summary
AuthenticationConfigBase
is marked asSerializable
but has anIServiceProvider
property which cannot be serialized (it's a type defined outside of DNN and is not marked asSerializable
). This causes an issue when using a caching provider that uses serialization, e.g. https://github.com/davidjrh/dnn.rediscachingproviderThis PR
adds themakes it retrieve theNonSerialized
attribute to the property andIServiceProvider
dynamically (so that it always has a valid value, even after going through serialization).Fixes #3592