Press Ctrl + C to terminate!

When starting a console version of the ApplicationServer, it outputs “Press Ctrl + C to terminate”. Is there a way to prevent it doing so? I presumed originally that by subclassing ApplicationServer and overriding the OnStarting() method I would be able to prevent it. It seems to be more deeply embedded than that though.

Just to clarify, I’m not concerned about preventing the application being terminated, I just don’t want the message showing up whenever the server is enabled.

Is there a simple (or complex if necessary) way to do this?

Hello

This message is not configurable. The only way to have a console server without it is to not use the ApplicationServer class at all

Thanks, logged as bugs://78445

Thanks for the quick response.

I think rather than find my way through the NetworkServer configuration system, I’ll opt to temporarily suppress console output while the server is starting up; that will suffice while things are still in development.

Do not dife too much. We’ll make this message configurable (hopefully in the next Beta)

I look forward to it; thank-you!

bugs://78445 got closed with status fixed.

Starting next Beta you can override the ConsoleServerFooter property of the ApplicationServer class. You can set it to any arbitrary message or to empty/null string:

	class ConsoleServer : ApplicationServer
	{
		public ConsoleServer(String applicationName, params Type[] serviceTypes)
			: base(applicationName, serviceTypes)
		{
		}

		protected override string ConsoleServerFooter
		{
			get
			{
				return "";
			}
		}
	}
1 Like

Thanks again.