Change location of debug settings in web config

35 views
Skip to first unread message

zcl...@gmail.com

unread,
May 18, 2013, 3:20:14 PM5/18/13
to cass...@googlegroups.com
Hi I'm new to the group and am wondering if its possible to move the location of the debug settings to another xml file. How extensible is this library?

Thanks,
ZC

Daniel Lo Nigro

unread,
May 30, 2013, 8:46:41 AM5/30/13
to cass...@googlegroups.com
All Web.config sections support the configSource attribute which lets you specify a different XML file to load settings from (see http://weblogs.asp.net/fmarguerie/archive/2007/04/26/using-configsource-to-split-configuration-files.aspx for example). This means you could do:
<cassette configSource="Cassette.config" />

And put the configuration in Cassette.config.

If you want to load settings from elsewhere, you could also create a class that inherits from IConfiguration<CassetteSettings> and put your configuration logic in the Configure method. Cassette uses dependency injection internally so you can pretty easily override a lot of its behaviour :)
Reply all
Reply to author
Forward
0 new messages