Configuration error c# App config
<p>I am writing a console application for moving integration file from Shared drive to the linux server using C#.New application works fine and doing its job, recently I have decided to use configuration file save attributes like filepath.</p>

<p>Since I have started using the configuration file I am getting an error "Configuration system failed to initialize" with no further detail. Below is the text from my configuration file</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
&lt;Appsettings&gt;

&lt;Add key="UserName" value="my username" /&gt;
&lt;Add key="HostName" value="Ip Add" /&gt;
&lt;Add key="Password" value="MyPassword" /&gt;
&lt;Add key="SshHostKeyFingerprint" value=" code" /&gt;
&lt;Add key="sourcepath" value="file path" /&gt;
&lt;Add key="destinationpath" value="file path" /&gt;
&lt;Add key="MagentoDestinationpath" value="file path" /&gt;
&lt;Add key="filestomove" value="*.csv" /&gt;
&lt;Add key="Logfilepath" value="file path" /&gt;


&lt;/Appsettings&gt;
&lt;/configuration&gt;
</code></pre>

<p>I have commented out all code apart from below line to trouble shoot</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WinSCP;
using System.Threading;
using System.IO;
Using System.Configuration;
using System.Collections.Specialized;
namespace Magentogiftcard
{
 class Program
{
 static void Main(string[] args)

    {

        string Host = ConfigurationManager.AppSettings.Get("UserName");
        Console.WriteLine("Host");  

    }

    }

  }
</code></pre>

<p>But still getting this issue. I will appriciate any help.</p>

<p>regards
Jahangir Khizer</p>