I have my validation configuration stored in validation.config in my Business Object project. The config file is set to copy if newer
The business object project is referenced by my web project, therefore, the validation.config copies to the bin folder of my web application.
In my web.config I have the validation configuration redirected:
<enterpriseLibrary.ConfigurationSource selectedSource="System Configuration Source">
<sources>
<add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add name="ValidationConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
filePath="bin\validation.config" />
</sources>
<redirectSections>
<add sourceName="ValidationConfigurationSource" name="validation" />
</redirectSections>
However, using procmon I can see it is trying to load the configuration from C:\WINDOWS\system32\bin\validation.config
The source for the FileConfigurationSource doesn't seem to have anything in it about creating a path using AppDomain.CurrentDomain.BaseDirectory so I'm not sure how relative paths can work with asp.net
How can I get this to work for an ASP.NET application?
I am running on XP using the local IIS server launching in debug mode.
Edit
Sorry, just realized there are two open issues filed for this:
http://entlib.codeplex.com/workitem/26990
http://entlib.codeplex.com/workitem/26760
If I come up with a workaround, I will post here.