XSocket 的插件框架不起作用:我无法获得 IXSocketServerContainer 的实例 [英] XSocket's Plug-in Framework not working: I cannot get an instance of IXSocketServerContainer

查看:24
本文介绍了XSocket 的插件框架不起作用:我无法获得 IXSocketServerContainer 的实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下代码来启动我的服务器:

I have following code to start my server:

private static IXSocketServerContainer server = null;

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

这对我来说在 WinXP 和 Win7 下工作得很好,使用完全相同的 dll 和 exe 文件集,但现在我在 WinServer 2008 下部署了我的系统,但出现以下错误:

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服务器|0|0||0||TypeInitializationException: ;类型初始化器'XSockets.Plugin.Framework.Composable' 抛出异常.;这模块应包含程序集清单.(例外来自结果:0x80131018)

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?

我现在的配置如下:

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

推荐答案

我回答这个问题只是为了完成并帮助任何可能面临这个问题的人.您可以执行以下两项操作:第一:升级到插件框架1.3,(XSockets 3.0.3),这是强制性的第二:尽量限制dll加载,以防bin文件夹中有很多库:

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,谢谢你的帮助!!

Uffe, thanks for your help!!

这篇关于XSocket 的插件框架不起作用:我无法获得 IXSocketServerContainer 的实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆