Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
951 stars 601 forks source link

Could not load type 'Sustainsys.Saml2.WebSso.Saml2Module' from assembly 'Sustainsys.Saml2' #1462

Closed AdarshSynfinity closed 6 days ago

AdarshSynfinity commented 1 month ago

Security issues

"I'm implementing SSO login using SAML authentication with Okta as the Identity Provider (IDP) in a .NET Framework 4.8.1 web API application. After setting up the Assertion Consumer Service (ACS) URL, we successfully triggered the ACS method and placed a debug point. To access the user details from the SAML assertion, I need an external library/package, so I'm using 'Sustainsys.Saml2'. According to the official documentation and reference sites, the first step is to add some configuration settings to the web.config file, as shown below."

Refer to the system.webserver tag from web.config attached in the below screenshots.

As soon as this line add name = Saml2Module is added when the application is started the above error occurs. Please refer to the below error message

ErrorPage SAML pkg WebconfigPage WebCOnfigPage2

Please let me know if Sustainsys.Saml2 supports .NET framework 4.8.1 application to fetch the user details from SAML assertion (IDP).

Please drop example code/ resource if any for .NET framework web api application.

AndersAbel commented 1 month ago

The HttpModule is in the Sustainsys.Saml2.HttpModule package.

AdarshSynfinity commented 1 month ago

Thanks @AndersAbel, I tried installing Sustainsys.Saml2.HttpModule package installed successfully. But i'm still getting the same issue.

VisualStudio2022 same issue

AndersAbel commented 1 month ago

It looks like your configuration is incorrect. See https://github.com/Sustainsys/Saml2/blob/v2/Samples/SampleHttpModuleApplication/Web.config for a working example.