We ran into an issue using the UltimateSaml library. The code is not working when using sessionState mode="StateServer" (rather than InProc).
The error is thrown when calling the method below:
The exception is:
**Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted.**
It seems that the library puts an object in the Session object which is not marked as Serializable.
We are currently evaluating your solution and this is a no-go for us.
We can not change the sessionState to 'InProc' in our application.
Is there any way to fix this issue?