Hello,
I am using the DictionaryAdapter to help me strongly type the
configuration settings for my application, using a technique described
here http://blog.andreloker.de/post/2008/06/Castle-DictionaryAdapter.aspx
I have a simple interface in a library called Test.Service:
ISettings {
string ServiceURL { get; }
bool PostToService { get; }
}
and in TestSite web.config I have
<appSettings>
<add key="ServiceURL " value="http://localhost/Default.aspx"/>
<add key="PostToService " value="false"/>
</appSettings>
Finally, the DictionayAdapter with appSettings and registered with the
container:
Container = new WindsorContainer();
var adapter = new
DictionaryAdapterFactory().GetAdapter<ISettings>(ConfigurationManager.AppSettings);
Container.Register(Component.For<ISettings>().Instance(adapter));
In the live system the DictionaryAdapter is throwing a
System.TypeLoadException. It is trying to find the type
Test.Service.SettingsDictionaryAdapter from the library
Test.Serive.ISettings.DictionaryAdapter. This doesn't happen on my
local PC. Any ideas why this would be? I am using version 1.0.3.0
Thanks, Keith.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.