Reputation: 15598
I am using the Validation Application Block form the Enterprise Lib, and have my validation rules defined in a validation.config that is located in the same assembly as the entity objects (so I can use the same rules in both the backend and on the website).
But how do I get the validation.config from the entity assembly into the website assembly's web.config?
Upvotes: 0
Views: 718
Reputation: 116977
If your question is about loading config files that are not the standard App.config or web.config files, the ConfigurationManager has a method that you can play around with.
System.Configuration.Configuration config =
ConfigurationManager.OpenExeConfiguration(@"pathToFile\Config.dll");
This would try to load a file called Config.dll.config.
Upvotes: 1