The application start might be interrupted by StackOverflowException when using OWIN authentication and the number of sites is over several hundred. These can be sites defined in the Sitecore configuration as well as SXA sites. The root cause of the issue is the faulty behavior of the processor that triggers the Single Sign-Out functionality, namely the LogoutEndpoint processor.
Consider one of the following options:
<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/"> <sitecore role:require="Standalone or ContentDelivery or ContentManagement"> <pipelines> <owin.initialize> <processor type="Sitecore.Owin.Authentication.IdentityServer.Pipelines.Initialize.LogoutEndpoint, Sitecore.Owin.Authentication.IdentityServer"> <patch:delete /> </processor> </owin.initialize> </pipelines> </sitecore> </configuration>
<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore role:require="Standalone or ContentDelivery or ContentManagement"> <pipelines> <owin.initialize> <processor type="Custom.Owin.Authentication.IdentityServer.Pipelines.Initialize.LogoutEndpoint, Custom.Assembly" resolve="true" patch:instead="*[@type='Sitecore.Owin.Authentication.IdentityServer.Pipelines.Initialize.LogoutEndpoint, Sitecore.Owin.Authentication.IdentityServer']" /> <processor type="Custom.Owin.Authentication.Samples.Pipelines.Initialize.ShowUserAuthType, Custom.Assembly" resolve="true" patch:instead="*[@type='Sitecore.Owin.Authentication.Samples.Pipelines.Initialize.ShowUserAuthType, Sitecore.Owin.Authentication.Samples']" /> </owin.initialize> </pipelines> </sitecore> </configuration>