XmlException getting thrown from config file

236 views Asked by At

I'm using the Coherence API for .NET. I have the standard configuration necessary for the API to function:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <configSections>
       <section name="coherence" type="Tangosol.Config.CoherenceConfigHandler,     Coherence"/>
   </configSections>
 <coherence>
    <cache-factory-config>coherence.xml</cache-factory-config>
    <cache-config>cache-config-client-dev1.xml</cache-config>
    <pof-config>pof-config.xml</pof-config>
  </coherence>
</configuration>

My WPF has this main method:

[STAThread]
    public static void Main()
    {

        INamedCache cache = null;
        try
        {
            cache = CacheFactory.GetCache("reference-data|corp-id-to-employee");
        }
        catch(Exception e)
        {
            e.ToString(); 
        }


        CacheBrowser1.App app = new CacheBrowser1.App();
        app.InitializeComponent();
        app.Run();

    }

Every time I start the program, however, I get these exceptions:

A first chance exception of type 'System.Xml.XmlException' occurred in Coherence.dll
A first chance exception of type 'System.Exception' occurred in Coherence.dll

I'm almost certain it has something to do with the paths I specified for the XML files in the config file. I'm unfamiliar with .NET config files in general. What is my problem here? If it's a pathing issue, how does pathing work in config files. My XML files are located in

C:\LAS\CacheBrowserS\CacheBrowser1\CacheBrowser1\bin
1

There are 1 answers

2
SKG On

Please try removing the dashes in the attribute names or use quotes and brackets e.g. ["attribute-name"]