SuperWebSocket icon indicating copy to clipboard operation
SuperWebSocket copied to clipboard

Configuration exception: unknown attribute 'xmlns'.

Open sharov-am opened this issue 11 years ago • 2 comments

Hi!

I have following config file:

<?xml version="1.0"?><configuration>
  <configSections>
    <section name="superSocket" type="SuperSocket.SocketEngine.Configuration.SocketServiceConfig, SuperSocket.SocketEngine" />
  </configSections>
  <superSocket
               xmlns = "http://schema.supersocket.net/supersocket"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://schema.supersocket.net/supersocket  http://schema.supersocket.net/v1-7/supersocket.xsd"

               logFactory="ConsoleLogFactory"

               disablePerformanceDataCollector="true"
               maxWorkingThreads="500"
               maxCompletionPortThreads="500"
               minWorkingThreads="5"
               minCompletionPortThreads="5">
    <servers>
      <server name="SuperWebSocket"
              serverTypeName="SuperWebSocket"
              ip="Any"
              port="2012"
              clearIdleSession="true"
              clearIdleSessionInterval="1"
              idleSessionTimeOut="5"
              maxConnectionNumber="100"
              >

        <subProtocols>
          <protocol>
            <commands>
              <add assembly="SuperWebSocket.Samples.CommandAssembly"/>
              <!--
              you can add more command assemblies
              <add assembly="SuperWebSocket.Samples.CommandAssembly2"/>
              <add assembly="SuperWebSocket.Samples.CommandAssembly3"/>
              -->
            </commands>
          </protocol>
        </subProtocols>


      </server>
    </servers>

    <serverTypes>
      <add name="SuperWebSocket"
           type="SuperWebSocket.WebSocketServer, SuperWebSocket" />
    </serverTypes>  

    <logFactories>
      <add name="ConsoleLogFactory"
           type="SuperSocket.SocketBase.Logging.ConsoleLogFactory, SuperSocket.SocketBase" />
    </logFactories>
  </superSocket>
</configuration>

and when using BootstrapFactory.CreateBootstrapFromConfigFile("test.config") it throws. When I remove xmlns lines ( xmlns, xmlns:xsi, xsi:schemaLocation) everything works fine.

What I'm doing wrong? I use version 0.8 from Nuget.

Thanks in advance!

sharov-am avatar Jul 17 '14 16:07 sharov-am

It is not supported in SWS 0.8, you can try the latest source code in the repository.

kerryjiang avatar Jul 20 '14 00:07 kerryjiang

Thank you for response!

One more question: is it possible to see new version of SWS in nuget repository in near future?

sharov-am avatar Jul 21 '14 15:07 sharov-am