Accessing ConfigurationManager.AppSettings value from Spring.NET xml configuration
I have a requirement that requires me to use Spring.net to get a connectionstring that is stored inside the app.config, and then inject the retrieved connectionstring to a instantiated object. How can I do this using Spring.net's xml configuration? For e.g., instead of my codes doing this: // Spring.net config: <object name="myService" type="com.acme.MyService, com.acme"> <constructor-arg type="System.String" value="myConnectionName"/> </object> // Web.config: <connectionStrings> <add name="myConnectionName" connectionString="DB_connectionstring"/> </connectionStrings> // Codes: public class