Validation by external file - entlib 6

Topics: Validation Application Block
Aug 14, 2013 at 9:10 AM
I have SLN that contains WebSite (MVC 4) and Class Liberary BL.
The Validations are in BL, the object to validate sent from the Controller.
I wish to Configure Validation in external file - entlib.config, who created by entlib console.
I'm trying to create a reference between the Web.config to entlib.config

I mean, I do not know where to put the entlib.config, That the Web.config will recognize.
I tried to place it in the BIN directory of the WEB SITE, but it did not help.
I tried to place it in the WEB.CONFIG - same thing

any Idea?

<!-- For more information on Entity Framework configuration, visit -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" />
<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source" parentSource="">
  <add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" filePath="EntLib.config" />

Aug 15, 2013 at 2:27 AM
There is an issue in Enterprise Library 5 with relative paths and FileConfigurationSource: .

The issue was resolved in Enterprise Library 5 Optional Update 1 (version 5.0.505.0). So, the solution is to upgrade to that version or to use an absolute file path (or to use one of the workarounds suggested in the issue comments).

Randy Levy
Enterprise Library support engineer
Support How-to
Aug 15, 2013 at 5:41 AM
Hi Randy.
Thanks your reply.
I work with entlib6, and this is the answer :

Have a nice day.

---------- Forwarded message ----------