Weird Error: SAMLConfigurationException: Multiple configurations are loaded and a SAML configuration ID hasn't been specified.

I say the error is weird because it only occurs in one environment and with one service provider. I can run this successfully using the same code in three other environments. The configuration is done in code. I used BeyondCompare to check for differences in the file system, and could not find any.

The full error text is:

ComponentSpace.SAML2.Exceptions.SAMLConfigurationException: Multiple configurations are loaded and a SAML configuration ID hasn’t been specified.
at ComponentSpace.SAML2.Configuration.SAMLConfiguration.GetCurrent() in C:\Sandboxes\ComponentSpace\SAMLv20\Library\Configuration\SAMLConfiguration.cs:line 178
at ComponentSpace.SAML2.InternalSAMLIdentityProvider…ctor() in C:\Sandboxes\ComponentSpace\SAMLv20\Library\InternalSAMLIdentityProvider.cs:line 581
at ComponentSpace.SAML2.SAMLIdentityProvider.InitiateSSO(HttpResponse httpResponse, String userName, SAMLAttribute[] attributes, String relayState, String partnerSP, String assertionConsumerServiceUrl) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLIdentityProvider.cs:line 589
at ComponentSpace.SAML2.SAMLIdentityProvider.InitiateSSO(HttpResponse httpResponse, String userName, IDictionary attributes, String relayState, String partnerSP) in C:\Sandboxes\ComponentSpace\SAMLv20\Library\SAMLIdentityProvider.cs:line 533
at SSO.Send(HttpResponse response, String userName, String uniqueId, String firstName, String lastName, DateTime birthday, String localCertFile, String partnerCertFile, String relayState, String assertionConsumerServiceUrl, String partnerServiceProviderName, String endClientName, String cpw)
at WebApp.Areas.SSO.Controllers.AcsController.Vendor() in C:\Program Files (x86)\Jenkins\jobs\MySite\workspace\MySite\Areas\SSO\Controllers\ACSController.cs:line 133
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult.CallEndDelegate(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.b__3d()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.b__3f()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.b__32(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.b__1c()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult)


If anyone has some insight, I would really appreciate the help.

Could you please email to support@componentspace.com your code for setting up the SAML configuration?
Are you specifying multiple SAML configurations or just a single SAML configuration?

[quote]
ComponentSpace - 3/28/2017
Could you please email to support@componentspace.com your code for setting up the SAML configuration?
Are you specifying multiple SAML configurations or just a single SAML configuration?

[/quote]

A single one, and sure. I just couldn't post the whole thing without a lot of revisions.

Thanks. I’ll reply to your email.