Load SAMLConfiguration from somewhere other than root

I want to use the SAMLConfiguration object instead of having to configure everything myself, but I’d like to put the saml.config file somewhere other than the root.

Can I do that?

Yes. By default saml.config is loaded from the application’s root directory. However, saml.config may reside in any directory you wish, as long as the appropriate file permissions are set so that the file can be read.
To load saml.config from a different directory, you need to call SAMLConfiguration.Load prior to any other SAML API calls. For example:



Looks Currently SAMLConfiguration.Load(@“c:\config\saml.config”) is not available what is the alternative method so that i can load saml.config file in session_start in (Asp.net Global.asax)


Hi Manikandan
We refactored the SAMLConfiguration class and you’ll find there’s now a SAMLController class and SAMConfigurationFile class.
If the saml.config file is in the application’s root folder, this is loaded automatically.
If you prefer a different location, you can specify this with the SAMLConfigFile app setting in web.config and it will be loaded automatically.
For example:

The file is loaded automatically immediately prior to the first SSO.
If required, you can force the file loading by calling SAMLController.Initialize() in application start-up.