Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 956065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:29:05+00:00 2026-05-16T00:29:05+00:00

I have my validation configuration stored in validation.config in my Business Object project. The

  • 0

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.

  • 1 1 Answer
  • 5 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:29:06+00:00Added an answer on May 16, 2026 at 12:29 am

    To fix the code in the Microsoft Enterprise Library source, replace the following method in FileConfigurationSource.cs with the code shown below. The modified code moves the check for file existence after the creation of a rooted file path.

        private static string GetRootedCurrentConfigurationFile(string configurationFile)
        {
            if (string.IsNullOrEmpty(configurationFile))
                throw new ArgumentException(Resources.ExceptionStringNullOrEmpty, "configurationFile");
    
    
            string strPath =
                Path.IsPathRooted(configurationFile)
                ? configurationFile
                : Path.Combine(AppDomain.CurrentDomain.BaseDirectory, configurationFile);
    
            if (!File.Exists(strPath))
            {
                throw new FileNotFoundException(
                    string.Format(
                        CultureInfo.CurrentCulture,
                        Resources.ExceptionConfigurationLoadFileNotFound,
                        configurationFile));
            }
            return strPath;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have MVC 1.0 app with VS2008. I have added configuration to web.config but
I have set up a ruleset in my configuration file which has two validators,
I have a web application project. I want to add Configuration Source and keep
I have set validation attributes in the model of my WCF service [MinLength(6, ErrorMessage
I have to parse a XML configuration file. I decided to do the basic
I have created a configuration section designer project to represent nodes of a custom
It seems that org.hibernate.cfg.Configuration object can be used to perform validation programmatically, by calling
I have Panel with set of fields,Those fields have some bundled validation rules and
I have the validation for autocomplete working. http://skoizumi.com/autocomplete/index.html var ac = $( #searchtext ).autocomplete({
I have custom validation rule: public function customRule($check) { } Inside this rule I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.