How to use SystemWebAdapter SessionClient to share only registered keys and ignore the others

Rob de Bruin 5 Reputation points
2024-05-15T08:37:39.3666667+00:00

I am learning how to migrate a large .net framework application to .net core and am happy with the tooling provided by SystemWebAdapters and RemoteAppClient. The framework application uses session state extensively and it looks like the default behaviour requires me to register ALL session state keys in advance to avoid getting an exception about unregistered keys. This imposes a threat as the frame work application is large and still actively maintained. Is it possible to configure the SessionClient / Session Serializer (i am using AddJsonSessionSerializer) in such a way what only the registered keys are shared and all others are ignored? (So my application will not break if a developer adds a new key without registering)

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,904 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,594 questions
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.