An unhandled exception of type 'System.MissingMethodException' occurred in SuperSocket.SocketEngine.dll Additional information: Method not found: 'System.String SuperSocket.SocketBase.Config.IRootConfig.get_DefaultCulture()'.

Feb 24, 2014 at 6:42 AM
Hi,

I'm getting this error

An unhandled exception of type 'System.MissingMethodException' occurred in SuperSocket.SocketEngine.dll

Additional information: Method not found: 'System.String SuperSocket.SocketBase.Config.IRootConfig.get_DefaultCulture()'.

on code
var bootstrap = BootstrapFactory.CreateBootstrap();
When I go to difiniton of BootstrapFactory class

i get
#region Assembly SuperSocket.SocketEngine.dll, v1.6.0.4
// C:\Users\hcl2\Documents\Visual Studio 2013\Projects\StartbyConfig_SuperSocket_Test\packages\SuperWebSocket.0.9.0.2\lib\net40\SuperSocket.SocketEngine.dll
#endregion

using SuperSocket.SocketBase;
using SuperSocket.SocketBase.Config;
using System;

namespace SuperSocket.SocketEngine
{
    public static class BootstrapFactory
    {
        public static IBootstrap CreateBootstrap();
        public static IBootstrap CreateBootstrap(IConfigurationSource config);
        public static IBootstrap CreateBootstrap(string configSectionName);
        public static IBootstrap CreateBootstrapFromConfigFile(string configFile);
    }
}
where as your git
https://github.com/kerryjiang/SuperSocket/blob/master/SocketEngine/BootstrapFactory.cs

have definitions.

Why is it so?

Thanks,
Feb 24, 2014 at 6:49 AM
just to add details....

I'm running the Start By Config sample code from your projects
Feb 24, 2014 at 7:35 AM
Anybody there?

This is not getting into my head

even the sample project fail to initialize the BootstrapFactory
Feb 24, 2014 at 7:57 AM
appserver is null,
Feb 24, 2014 at 8:38 AM
Seems that you has set a wrong target or missing compile symbol.
The 'DefaultCulture' was only available on .net 4.5, so there may be something wrong in your project setting.
Feb 24, 2014 at 8:54 AM
Im compiling it in .net 4.5
Feb 24, 2014 at 9:15 AM
Edited Feb 24, 2014 at 9:17 AM
Under .net4.5, you need to include 'IRootConfig.Net45.cs' to your project.
Feb 24, 2014 at 9:19 AM
And how to do that is that a reference?
Feb 24, 2014 at 9:21 AM
erarijit wrote:
even the sample project fail to initialize the BootstrapFactory
can you help with this as well?

Ok That's a file I guess.
Feb 24, 2014 at 9:36 AM
It doesn't solve the problem, It's still there
Feb 24, 2014 at 9:43 AM
and when I include the TelnetServer.cs file

the IRootConfig file gives an conflict issue
 protected override bool Setup(IRootConfig rootConfig, IServerConfig config)
        {
            return base.Setup(rootConfig, config);
        }
Error 8 'StartbyConfig_SuperSocket_Test.TelnetServer.Setup(SuperSocket.SocketBase.Config.IRootConfig, SuperSocket.SocketBase.Config.IServerConfig)': no suitable method found to override C:\Users\hcl2\Documents\Visual Studio 2013\Projects\StartbyConfig_SuperSocket_Test\StartbyConfig_SuperSocket_Test\TelnetServer.cs 12 33 StartbyConfig_SuperSocket_Test
Feb 24, 2014 at 10:12 AM
Sorry for I don't know where the file 'TelnetServer.cs‘
Feb 24, 2014 at 10:16 AM
when you will download the SuperSocket 1.6 stable version, you can find it in here

SuperSocket(1.6 stable).Source\QuickStart\Basic\TelnetServer_AppServer
Feb 24, 2014 at 10:25 AM
Any Idea About this error

An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in SuperSocket.SocketEngine.dll

Additional information: Missing 'superSocket' or 'socketServer' configuration section.
Feb 24, 2014 at 10:36 AM
An unhandled exception of type 'System.Configuration.ConfigurationErrorsException' occurred in SuperSocket.SocketEngine.dll

Additional information: Missing 'superSocket' or 'socketServer' configuration section.


Solution:

Need to add the below code in the appconfig file
<configSections>
    <section name="superSocket"
             type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine"/>
  </configSections>