Up-to-date Adding Application to Server tutorial

Options
hanuman
hanuman
edited November 2012 in Photon Server
Hi everyb,

I've just started with Photon Server and with no problem installed server in 5 minutes and also clients samples. But stumbled when I tried to implement custom server side code trying to follow this tutorial trying to do everything as mentioned. When I added corresponding section to PhotonServer.config:
[code2=xml]<Application
Name="ChatServer"
BaseDirectory="ChatServer"
Assembly="ChatServer"
Type="ChatServer" />[/code2]
server just does not start. Yep, I've rechecked all paths etc. Can someone please guide where I may be wrong? Thanks in advance.

Comments

  • Tobias
    Options
    Maybe the type needs a namespace (it must be a fully qualified name). Like we do with "Lite.LiteApplication".
    It could also be an issue with the location of the dlls. The directory you have those in is: deploy/ChatServer or deploy/ChatServer/bin?
    Check the start logs of the server and let us know what's the error msg.
  • hanuman
    Options
    Hi Tobias,
    Thanks for quick reply.

    I've just copied all files from /bin/release/ of project to deploy/EpicServer/bin, is it enough?

    01.11.2012 11:21 6 144 EpicServer.dll
    01.11.2012 11:21 15 872 EpicServer.pdb
    19.07.2012 13:11 139 776 ExitGamesLibs.dll
    19.07.2012 13:11 390 656 ExitGamesLibs.pdb
    19.07.2012 13:11 486 923 ExitGamesLibs.xml
    27.07.2012 16:51 188 928 Photon.SocketServer.dll
    27.07.2012 16:51 552 448 Photon.SocketServer.pdb
    27.07.2012 16:51 404 815 Photon.SocketServer.xml


    As mentioned in instruction root class name EpicServer is defined without namespace. Or should I define it within namespace and then mean it like NameSpace.ClassName?

    That is error log:

    2848: 14:38:46.886 - Service: "Photon Socket Server" starting
    2848: 14:38:46.902 - Config File: D:\Work\PhotonServer\Server\deploy\bin_Win32_xp\PhotonServer.config
    2848: 14:38:46.902 - Will produce at most: 10 crash dumps
    2848: 14:38:46.902 - Action:debug
    2848: 14:38:46.902 -
    2848: 14:38:46.902 - WARNING: ***************************************************************
    2848: 14:38:46.902 - WARNING: Photon has been built to operate on an operating system earlier than Windows Vista.
    2848: 14:38:46.902 - WARNING: Performance will not be as good as when built for Windows Vista or later.
    2848: 14:38:46.902 - WARNING: ***************************************************************
    2848: 14:38:46.902 -
    2848: 14:38:46.902 - Server Starting...
    2848: 14:38:46.902 - Tick count: 183706 (wraps in: 49.7081 days)
    2848: 14:38:46.902 - Photon Version: 3.0.27.1684
    2848: 14:38:46.902 - PID: 2840
    2848: 14:38:46.902 - Config File: D:\Work\PhotonServer\Server\deploy\bin_Win32_xp\PhotonServer.config
    2848: 14:38:46.902 - CService::OnException() - Exception: CXMLDocument::LoadFromString() - Error reading Attributes.
    2848: 14:38:46.902 - Server shutting down...


    And that's the piece of config file:

    <Applications Default="Lite">
    <!-- Lite Application -->
    <Application
    Name="Lite"
    BaseDirectory="Lite"
    Assembly="Lite"
    Type="Lite.LiteApplication"
    ForceAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>

    <!-- LiteLobby Application -->
    <Application
    Name="LiteLobby"
    BaseDirectory="LiteLobby"
    Assembly="LiteLobby"
    Type="LiteLobby.LiteLobbyApplication"
    ForceAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>

    <!-- MMO Demo Application -->
    <Application
    Name="MmoDemo"
    BaseDirectory="MmoDemo"
    Assembly="Photon.MmoDemo.Server"
    Type="Photon.MmoDemo.Server.PhotonApplication"
    ForceAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>


    <!-- CounterPublisher Application -->
    <Application
    Name="CounterPublisher"
    BaseDirectory="CounterPublisher"
    Assembly="CounterPublisher"
    Type="Photon.CounterPublisher.Application"
    ForceAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>

    <!-- Flash & Silverlight Policy Server -->
    <Application
    Name="Policy"
    BaseDirectory="Policy"
    Assembly="Policy.Application"
    Type="Exitgames.Realtime.Policy.Application.Policy">
    </Application>

    <!-- EpicServer Application -->
    <Application
    Name="EpicServer"
    BaseDirectory="EpicServer"
    Assembly="EpicServer"
    Type="EpicServer"
    </Application>
    </Applications>
  • dreamora
    Options
    You are missing the closing > after Type="EpicServer"
  • hanuman
    Options
    dreamora wrote:
    You are missing the closing > after Type="EpicServer"

    OMG. this typo costed me couple of hours beating with it...:(
    Thanx a lot dreamora! :geek: