Running CommondAssembly on Mono Failed

Mar 11, 2012 at 7:42 AM

This problem only occurs when run commandassembly on linux . But the same program running under the windows is normal .

Is there someone could help me?

and it's exception message like this :

mono SuperWebSocket.Service.exe -cPress any key to start server! 
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Unrecognized element 'commands'. (line 3)  at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0   at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0   --- End of inner exception stack trace ---  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0   at SuperSocket.Common.ConfigurationExtension.Deserialize[SubProtocolConfigCollection] (SuperWebSocket.Config.SubProtocolConfigCollection section, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.Configuration.Server.GetChildConfig[SubProtocolConfigCollection] (System.String childConfigName) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupSubProtocols (IServerConfig config) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupCommands (System.Collections.Generic.Dictionary`2 commandDict) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServer`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.InitializeServer (IServerConfig serverConfig) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config, System.Func`2 serverConfigResolver) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config) [0x00000] in <filename unknown>:0   at SuperWebSocket.Service.Program.RunAsConsole () [0x00000] in <filename unknown>:0   at SuperWebSocket.Service.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Unrecognized element 'commands'. (line 3)  at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0   at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0   --- End of inner exception stack trace ---  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0   at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0   at SuperSocket.Common.ConfigurationExtension.Deserialize[SubProtocolConfigCollection] (SuperWebSocket.Config.SubProtocolConfigCollection section, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.Configuration.Server.GetChildConfig[SubProtocolConfigCollection] (System.String childConfigName) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupSubProtocols (IServerConfig config) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupCommands (System.Collections.Generic.Dictionary`2 commandDict) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServer`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0   at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.InitializeServer (IServerConfig serverConfig) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config, System.Func`2 serverConfigResolver) [0x00000] in <filename unknown>:0   at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config) [0x00000] in <filename unknown>:0   at SuperWebSocket.Service.Program.RunAsConsole () [0x00000] in <filename unknown>:0   at SuperWebSocket.Service.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 

Coordinator
Mar 11, 2012 at 7:56 AM
It seems that you use old assemblies of SuperSocket, please ensure you use same assemblies for windows and Linux!

Sent from my Windows Phone

From: azraelrabbit
Sent: 3/11/2012 4:42 PM
To: kerry-jiang@hotmail.com
Subject: Running CommondAssembly on Mono Failed [SuperWebSocket:348152]

From: azraelrabbit

This problem only occurs when run commandassembly on linux . But the same program running under the windows is normal .

Is there someone could help me?

and it's exception message like this :

mono SuperWebSocket.Service.exe -cPress any key to start server!
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Unrecognized element 'commands'. (line 3) at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 at SuperSocket.Common.ConfigurationExtension.Deserialize[SubProtocolConfigCollection] (SuperWebSocket.Config.SubProtocolConfigCollection section, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.Configuration.Server.GetChildConfig[SubProtocolConfigCollection] (System.String childConfigName) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupSubProtocols (IServerConfig config) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupCommands (System.Collections.Generic.Dictionary`2 commandDict) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServer`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.InitializeServer (IServerConfig serverConfig) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config, System.Func`2 serverConfigResolver) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config) [0x00000] in <filename unknown>:0 at SuperWebSocket.Service.Program.RunAsConsole () [0x00000] in <filename unknown>:0 at SuperWebSocket.Service.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Configuration.ConfigurationErrorsException: Unrecognized element 'commands'. (line 3) at System.Configuration.ConfigurationElement.DeserializeElement (System.Xml.XmlReader reader, Boolean serializeCollectionKey) [0x00000] in <filename unknown>:0 at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 at SuperSocket.Common.ConfigurationExtension.Deserialize[SubProtocolConfigCollection] (SuperWebSocket.Config.SubProtocolConfigCollection section, System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.Configuration.Server.GetChildConfig[SubProtocolConfigCollection] (System.String childConfigName) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupSubProtocols (IServerConfig config) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].SetupCommands (System.Collections.Generic.Dictionary`2 commandDict) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServer`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperWebSocket.WebSocketServer`1[SuperWebSocket.WebSocketSession].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory, ICustomProtocol`1 protocol) [0x00000] in <filename unknown>:0 at SuperSocket.SocketBase.AppServerBase`2[SuperWebSocket.WebSocketSession,SuperWebSocket.WebSocketCommandInfo].Setup (IRootConfig rootConfig, IServerConfig config, ISocketServerFactory socketServerFactory) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.InitializeServer (IServerConfig serverConfig) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config, System.Func`2 serverConfigResolver) [0x00000] in <filename unknown>:0 at SuperSocket.SocketEngine.SocketServerManager.Initialize (IConfig config) [0x00000] in <filename unknown>:0 at SuperWebSocket.Service.Program.RunAsConsole () [0x00000] in <filename unknown>:0 at SuperWebSocket.Service.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

Mar 11, 2012 at 12:12 PM

i'm sure the supersocket assembly is the same one from the windows.

and i have download the Latest stable release 1.4sp3 to run the coommandassembly.

the problem still exist.

Coordinator
Mar 11, 2012 at 1:30 PM

Ok, I'll follow up this issue and try to test it in Linux.

Coordinator
Mar 11, 2012 at 1:32 PM

BTW, you also can load commands by programming instead of by configuration!

Mar 11, 2012 at 3:53 PM

ok,thanks a lot for your help.

and i also have a try to load commands by coding.

 

BTW, i use the MOMA(http://mono-project.com/MoMA) to scan the assembly of superwebsocket ,  there was a lot of problem on mono supporting.

Coordinator
Mar 11, 2012 at 3:56 PM

Yes, but not exactly, you can try to run test cases of SuperWebSocket by NUnit addin of MonoDeveloper, the project SuperWebSocketTest.

Mar 11, 2012 at 4:13 PM

does you run test case by MonoDeveloper under windows or linux?

i have run the test case always normally under windows.

Coordinator
Mar 11, 2012 at 4:14 PM

Both, but not verify it recently

Coordinator
Mar 12, 2012 at 9:32 AM

Yes, I got same error.

I have fixed it on my local, I plan to submit the change several hours later.

Coordinator
Mar 12, 2012 at 3:20 PM

The latest change should have fixed this issue, please check out it.

Mar 12, 2012 at 4:49 PM

thanks for your great job.

thanks again.