Exception thrown: 'System.IO.FileLoadException' in System.Web.dll

Currently testing out the trial Saml .NET in a Web Forms application.

When trying to hit SAMLServiceProvider.InitiateSSO(application.Response, returnUrl, partnerIdP);, the subject line exception is thrown.

Commenting out that line causes no problems. I thought perhaps it was a package version problem and have installed SAML2 via NuGet and through a local Package Source, but same problem. The application just loops at Application_BeginRequest and throws that error, Exception thrown: ‘System.IO.FileLoadException’ in System.Web.dll.

Our application is currently on .NET 4.7.2.

Any suggestions?

Thank you.

I assume this has something to do with attempting to load the saml.config file.
Please enable SAML trace and send 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
Also include the full stack trace.