Config error

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

Post Reply
Oleg_79
Posts: 161
Joined: 25 Feb 2011, 10:31
Location: Ukraine, Donetsk

Config error

Post by Oleg_79 »

Hi
I have config file

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<SmartFoxConfig>
  <ip>127.0.0.1</ip>
  <port>9933</port>
  <udpIp>127.0.0.1</udpIp>
  <udpPort>9933</udpPort>
  <zone>Domino</zone>
  <useBlueBox>false</useBlueBox>
</SmartFoxConfig>
when i try connect

Code: Select all

public void Connect()
        {
            _sfs.LoadConfig(@"Config\domino_settings.xml", false);            
        }
I hava Exception:

Code: Select all

System.Exception: Error dispatching event configLoadSuccess: Invalid Host/IpAddress in external config file    в Sfs2X.SmartFox.ValidateConfig(ConfigData cfgData)
   в Sfs2X.SmartFox.OnConfigLoadSuccess(BaseEvent e)
   в Sfs2X.Core.EventDispatcher.DispatchEvent(BaseEvent evt) ---> System.ArgumentException: Invalid Host/IpAddress in external config file
   в Sfs2X.SmartFox.ValidateConfig(ConfigData cfgData)
   в Sfs2X.SmartFox.OnConfigLoadSuccess(BaseEvent e)
   в Sfs2X.Core.EventDispatcher.DispatchEvent(BaseEvent evt)
   --- Конец трассировки внутреннего стека исключений ---
   в Sfs2X.Core.EventDispatcher.DispatchEvent(BaseEvent evt)
   в Sfs2X.Util.ConfigLoader.TryParse()
   в Sfs2X.Util.ConfigLoader.LoadConfig(String filePath)
   в Sfs2X.SmartFox.LoadConfig(String filePath, Boolean connectOnSuccess)
   в DominoAdminClient.Sfs.Client.Connect() в d:\svn_113\projects\c#\trunk\DominoAdminClient\DominoAdminClient\Sfs\Client.cs:строка 29
   в DominoAdminClient.MainForm.ClickButtons(Object sender, EventArgs e) в d:\svn_113\projects\c#\trunk\DominoAdminClient\DominoAdminClient\MainForm.cs:строка 39
   в System.Windows.Forms.Control.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnClick(EventArgs e)
   в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   в System.Windows.Forms.Control.WndProc(Message& m)
   в System.Windows.Forms.ButtonBase.WndProc(Message& m)
   в System.Windows.Forms.Button.WndProc(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Whats wrong with my config?
Oleg_79
Posts: 161
Joined: 25 Feb 2011, 10:31
Location: Ukraine, Donetsk

Re: Config error

Post by Oleg_79 »

if i use library for smartfox server 2x version 1.5.7 all works fine.
but if i use library version 1.6.0 all broke.
User avatar
Bax
Site Admin
Posts: 4626
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Config error

Post by Bax »

Please change the <ip> tag to <host> in the config file.
This was changed for consistency with the ConfigData object. Sorry for not mentioning in the release notes.
Paolo Bax
The SmartFoxServer Team
Post Reply