How to manually stop the server (from code)

edited March 2011 in Photon Server
Is there any way to stop the server manually, when we have failure in function Application.Setup()?
I use an Exception, like this:
throw new Exception("MySQL connect error");
but it seems not too gracefully...


  • There is usually no reason to shutdown the complete server when an application fails.

    While you develop, you might want to use the "shadow copy" settings. Those allow you to simply replace your failed application's dlls with new ones and the server will re-load those.
    Read: "The application node" on this page: ... pandconfig