XSocket's Plug-in Framework not working: I cannot get an instance of IXSocketServerContainer

你说的曾经没有我的故事 提交于 2019-12-13 20:48:03

问题


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:


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!!



来源:https://stackoverflow.com/questions/21252220/xsockets-plug-in-framework-not-working-i-cannot-get-an-instance-of-ixsocketser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!