A logout response was unexpectedly received.

Hi ComponentSpace:

We got an server error when we tried to logout as service provider. We, as service provider, signout locally, then send logout request to identify provider. Then we got this error message, A logout response was unexpectedly received. Can you help us to find/fix the exception?

Thanks,

David


-----------------------------------------------------------------
A logout response was unexpectedly received.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: ComponentSpace.SAML2.Exceptions.SAMLProtocolException: A logout response was unexpectedly received.

Source Error:

Line 15:             string relayState = null;Line 16: Line 17:             SAMLServiceProvider.ReceiveSLO(Request, out isRequest, out logoutReason, out partnerIdP, out relayState);Line 18: Line 19:             if (isRequest) {

Hi David
By default we store SAML SSO session state in the ASP.NET session.
I suspect the ASP.NET session is being cleared or abandoned prior to calling SAMLServiceProvider.ReceiveSLO.
Please ensure that your application doesn’t clear or abandon the ASP.NET session until after calling SAMLServiceProvider.ReceiveSLO.
If there’s sensitive information stored in the session, you can remove these specific entries at the time of logout but don’t clear the entire session until after SAML logout completes.

[quote]
ComponentSpace - 12/12/2017
Hi David
By default we store SAML SSO session state in the ASP.NET session.
I suspect the ASP.NET session is being cleared or abandoned prior to calling SAMLServiceProvider.ReceiveSLO.
Please ensure that your application doesn't clear or abandon the ASP.NET session until after calling SAMLServiceProvider.ReceiveSLO.
If there's sensitive information stored in the session, you can remove these specific entries at the time of logout but don't clear the entire session until after SAML logout completes.
[/quote]

Hi ComponentSpace Development,

It is the issue. Thank you so much!

David

You’re welcome.

[quote]
ComponentSpace - 12/12/2017
Hi David
By default we store SAML SSO session state in the ASP.NET session.
I suspect the ASP.NET session is being cleared or abandoned prior to calling SAMLServiceProvider.ReceiveSLO.
Please ensure that your application doesn't clear or abandon the ASP.NET session until after calling SAMLServiceProvider.ReceiveSLO.
If there's sensitive information stored in the session, you can remove these specific entries at the time of logout but don't clear the entire session until after SAML logout completes.
[/quote]

Hi ComponentSpace Development,

It is the issue. Thank you so much!

David[/quote]
Hi David,

What exactly you have done to resolve this issue ? could you please share the resolution and know how .
Thanks in advance.



The release from a couple of years ago stored SAML SSO state in the ASP.NET session.
The application was clearing the ASP.NET session as part of the logout which meant we didn’t have SAML SSO state to process the logout message.
The solution was to not clear the ASP.NET session until after SAML logout completed.
More recent releases don’t make use of the ASP.NET session.
If you’re getting a similar error I suggest enabling SAML trace and sending the generated log file as an email attachment to support@componentspace.com mentioning your forum post.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace

[quote]
ComponentSpace - 11/6/2019
The release from a couple of years ago stored SAML SSO state in the ASP.NET session.
The application was clearing the ASP.NET session as part of the logout which meant we didn't have SAML SSO state to process the logout message.
The solution was to not clear the ASP.NET session until after SAML logout completed.
More recent releases don't make use of the ASP.NET session.
If you're getting a similar error I suggest enabling SAML trace and sending the generated log file as an email attachment to support@componentspace.com mentioning your forum post.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace
[/quote]

Hi team I have just send you the mail please find.

Received. Thanks.