XSocket's Plug-in Framework not working: I can

2019-08-17 16:49发布

I have following code to start my server:

private static IXSocketServerContainer server = null;

public SocketServer()
{
    server = XSockets.Plugin.Framework.Composable.GetExport<IXSocketServerContainer>();
}

this worked fine for me under WinXP and Win7, with exactly the same set of dll and exe files, but now I deployed my system under WinServer 2008 and I get following error:

clsSocketIntHandler|new , startin servers|0|0||0||TypeInitializationException: ; The type initializer for 'XSockets.Plugin.Framework.Composable' threw an exception. ; The module was expected to contain an assembly manifest. (Exception from HRESULT: 0x80131018)

Do you have any idea why could this be happening? What can be missing on my deployment machine? Can you please recommend me an alternative configuration to avoid this kind of dynamic loading?

My configuration now is as follows:

<appSettings>
   <add key="XSockets.PluginCatalog" value="" />
   <add key="XSockets.PluginFilter" value="*.dll,*.exe" />
</appSettings>

1条回答
乱世女痞
2楼-- · 2019-08-17 17:15

I answer this question only for completion and to help anyone that may face this problem. There are tow things you can do: First: Upgrade to plug-in framework 1.3, (XSockets 3.0.3), this is mandatory Second: try to limit the dll to load in case that you have a lot of libraries in the bin folder:

<appSettings>
  <add key="XSockets.PluginCatalog" value="" />
  <add key="XSockets.PluginFilter" value="XSockets.*,your.dlls.*" />
  <!--
  <add key="SocketServer.StartServers.Location" value="ws://localhost:3232" />   
  -->
</appSettings>

Uffe, thanks for your help!!

查看更多
登录 后发表回答