我正在使用.NET的Coherence应用程序接口。我有运行该应用程序接口所需的标准配置:
<?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>我的WPF有这个main方法:
[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();
    }然而,每次我启动程序时,我都会得到以下异常:
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我几乎可以肯定这与我在配置文件中为XML文件指定的路径有关。一般来说,我对.NET配置文件并不熟悉。我的问题出在哪里?如果是路径问题,那么路径在配置文件中是如何工作的。我的XML文件位于
C:\LAS\CacheBrowserS\CacheBrowser1\CacheBrowser1\bin发布于 2015-06-23 05:35:52
请尝试删除属性名称中的破折号或使用引号和括号,例如" attribute -name“
https://stackoverflow.com/questions/30989460
复制相似问题