There is no SSO session to partner https:// .co.uk to logout.

We’re getting the following error when performing a logout from the Service Provider in our UAT environment.
In our live environment SSO and SLO work fine.
This error only happens in our UAT environment (which has the same code as Live). Logging in works fine but logging out gets the below exception:

[SAMLProtocolException: There is no SSO session to partner https://XXX.co.uk to logout.]
ComponentSpace.SAML2.AbstractSAMLProvider.CreateLogoutRequest(String logoutReason) +1068
ComponentSpace.SAML2.InternalSAMLServiceProvider.InitiateSLO(HttpResponseBase httpResponse, String logoutReason, String partnerIdP) +426
XXX.Web.Controllers.AccountController.Logout() in C:\src\XXX\src\XXX\Controllers\AccountController.cs:27
lambda_method(Closure , ControllerBase , Object[] ) +79
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary parameters) +242
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary parameters) +39
System.Web.Mvc.<>c__DisplayClass15.b__12() +120
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func continuation) +637
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func continuation) +637
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList filters, ActionDescriptor actionDescriptor, IDictionary parameters) +307
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +686

By default we store the SAML SSO session state in the ASP.NET session.
Please ensure that you don’t clear or abandon the ASP.NET session until after SAML logout completes.
If there’s still an issue, please enable SAML trace and email the generated log file to support@componentspace.com mentioning your forum post.
https://www.componentspace.com/Forums/17/Enabing-SAML-Trace
The log should include the successful SSO and failing SAML logout.