title: Could not find a part of the path
body: <p>Hey I'm using the <strong>ExeConfigurationFileMap</strong> class's <em>OpenMappedExeConfiguration</em> method to open a config file. The config file is used by two programs in the same directory.</p>
  
  <p>Everything is working fine on my development machine but when I copied the programs to another machine I get this error while executing the program</p>
  
  <pre><code>Code not find a part of the path D:\email\email.config
  </code></pre>
  
  <p>The other program can access the email.config file easily. Everything is one directory but the other program is pointing to the old path in my development machine :(</p>
  
  <p>Here is a portion of the code which throws the Exception</p>
  
  <pre><code>class Program
      {
          static readonly string configFileName = "email.config";
  
          static int Main(string[] args)
          {
              try
              {
                  var configMap = new ExeConfigurationFileMap { ExeConfigFilename = configFileName };
                  Configuration externalConfig = ConfigurationManager.OpenMappedExeConfiguration(configMap, ConfigurationUserLevel.None);
              }
              catch (Exception e)
              {
                  Console.WriteLine(e.Message);
                  return 1;
              }
          }
      }
  </code></pre>