ASP.NET SessionState issue with UltimateSAML using EasySaml namespace

Hello, 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: **Saml.IdentityProvider.InitiateSingleSignOn()** 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? Thanks, Michel
asked 10/4/2019 5:02:56 PM
add a comment

1 Answers

Hello, We are fixing this issue in the example and a new build will be released today. Or you can comment out `Session[SsoAttrsSession] = attributes;` at line 50 in `Samples\Web\CS\Saml2-EasySamlApi\Saml2SsoDemo\ServiceProvider\AssertionConsumerService.aspx.cs`
edited 10/10/2019 2:51:26 PM
answered 10/10/2019 2:44:01 PM
  Please download the updated one at []( sysadmin 10/11/2019 2:42:47 PM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged saml or ask your own question.