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

2 Answers

Hi is this build released? I have a UltimateSaml Pro for .NET version UltimateSaml-Pro_Standard_7.1.233.179 and facing this issue. I need the update asap. Thanks,
answered 11/5/2019 4:46:26 PM
  That release contains the update for the examples only. Please see our example projects and update yours accordingly. sysadmin 11/5/2019 4:53:48 PM
  We've commented out that line of code and we're still facing this problem. Wasif 11/6/2019 9:46:39 PM
add a comment
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.