I've recently updated from Kentor to Sustainsys, and I am now looking to move my SAML2 tenant thumbprints from the web.config to a database. This way I can add/delete/modify thumbprints without re-deploying the project. To do so, I need the ability to specify the thumbprint in the code.
Can you provide a code example of how the thumbprint would be set programmatically? I’m using the HttpModule. I’ve tried accessing:
Value cannot be null.
Parameter name: configSection
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: configSection
Any suggestions or sample code would be greatly appreciated.
You still need the config section in the web.config - that's the base for the HttpModule configuration. Then you can add/alter on top of that programmatically.
I've recently updated from Kentor to Sustainsys, and I am now looking to move my SAML2 tenant thumbprints from the web.config to a database. This way I can add/delete/modify thumbprints without re-deploying the project. To do so, I need the ability to specify the thumbprint in the code.
Can you provide a code example of how the thumbprint would be set programmatically? I’m using the HttpModule. I’ve tried accessing:
Sustainsys.Saml2.HttpModule.Saml2AuthenticationModule.Options
And
Sustainsys.Saml2.Configuration.Options.FromConfiguration
But both of them throw the following exception:
Value cannot be null. Parameter name: configSection Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ArgumentNullException: Value cannot be null. Parameter name: configSection
Any suggestions or sample code would be greatly appreciated.
Thank you!