[Resolved]Debug server application

edited January 2011 in Photon Server
Hello, I have bunch of code I made earlier to use with server, now I want to integrate it with photon. However it was originaly stub console program, now I embeded it into photon app library which compiles fine. However when I attempt to call Main method from PhotonApplication.Initialize() i get just a hint in instance log.
3580: 16:53:49.889 - ERROR: Failed to start application: "Test" in app domain: 2
3580: 16:53:49.889 - CService::OnException() - Exception: CManagedHost::StartApplication() - Failed to start application in AppDomain: 2 - Object reference not set to an instance of an object.
3580: 16:53:49.889 - Server shutting down...
Is there a way for me to get complete debug information so I know where exactly it fails?

Comments

  • first, setup log4net in the application setup method.
    then use a try catch block around your main method and log the exception.
    the full exception will be visible in the file that you created with log4net.
  • Yep works like a charm. Thanks.
Sign In or Register to comment.