CJR Gaming - Server2Server tutorial - stucked

Options
Briksins
edited January 2013 in Photon Server
Hello
I was fallowing tutorial and stuck after lesson 008.
It was says at the end of the lesson that so far if we start server it should be able to start Master node and Login node and they would find each other.
My project doesn't have any errors and compiles perfectly, however server is not starting with weird error:


Part of Log File:
[code2=csharp]7788: 18:35:15.156 - Application will NOT restart if files matching the following are changed: "log4net.config"
7788: 18:35:15.266 - Master:2 - Start() failed.
Exception:
System.TypeLoadException: Failed to create object "Server2Server.MasterServer" from assembly "Server2Server".
at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.Start(String assemblyName, String typeName, String instanceName, String applicationName, IPhotonApplicationSink sink, ILogToUnmanagedLog logger, IControlListeners listenerControl)
at PhotonHostRuntime.PhotonDomainManager.Start(String assemblyName, String typeName, String instanceName, String applicationName, IPhotonApplicationSink sink, ILogToUnmanagedLog logger, IControlListeners listenerControl)
7788: 18:35:15.268 - Master:2 - Stop() failed.
Exception:


System.Exception: Stop: unable to call the Application.TearDown() - undefined photonControl.


at PhotonHostRuntime.PhotonDomainManager.PhotonPlainAppDomainBehavior.Stop()
at PhotonHostRuntime.PhotonDomainManager.Stop()
7788: 18:35:15.268 - ERROR: Failed to start application: "Master" in app domain: 2
7788: 18:35:15.268 - CService::OnException() - Exception: CManagedHost::StartApplication() - Failed to start application in AppDomain: 2 - Failed to create object "Server2Server.MasterServer" from assembly "Server2Server".
6692: 18:35:15.268 - CManagedHost::OnDefaultAction() - OPR_AppDomainUnload - eUnloadAppDomain
7788: 18:35:15.268 - Server shutting down...[/code2]

I know it is hard to guess from the log file, and i have no idea which part of the code i would need to share, so i will share entire project
You can download it from my public DropBox[43kb]

I re-watched several times all videos up to lesson 8, still cant get what i did wrong
The main problem was with OutgoingMasterServerPeer.cs and it Register() method, but i think i adopt it correctly to the current new version of Photon
everything rest was done 99% as it on video, possible i missed this 1% :)

Could anyone help me please?
Best Regards
Vadims Briksins

Comments

  • Did you find a solution to this issue?
    I am stuck with the exact same problem.

    Best regards,
    Mike
  • Hi Vadims, Mike,

    sorry that it took us so long to have a look at this. Oh, and thanks for providing the source code! :)

    The problem is that the PhotonServer.config tries to load the Type "Server2Server.MasterServer" - but the class name is actually "Server2Server.MasterServer.MasterServer".

    If you change your PhotonServer.config like this, it should work:
    [code2=xml]<Application
    Name="Master"
    BaseDirectory="Server2Server"
    Assembly="Server2Server"
    Type="Server2Server.MasterServer.MasterServer">
    </Application>[/code2]


    Perhaps you can give the creator of the tutorial a little hint, maybe he wants to update his tutorial. ;)
  • Thank you very much, that was it! I guess I would have wasted a couple more hours on this.

    Best regards,
    Mike
  • dragagon
    Options
    Vadims and Mike,

    I need to look in these forums more often. I might suggest you drop by http://www.cjrgaming.com and use the forums to get in contact with me the next time, since I would be able to help a little more directly. It would also help so I can add corrections to my tutorials for future users. Thanks for following the tutorials and Be sure to check out the new series covering the framework I built. It goes into more depth and builds a better set of code than the Server2Server code as it is meant for actual use instead of showing how Photon works.

    Christian