J
jabailo
I am running the following remoting server as a Console application, and
I want to convert it to a Windows Service.
[STAThread]
static void Main(string[] args)
{
System.Runtime.Remoting.RemotingConfiguration.
Configure("ChatServer.exe.config");
Console.WriteLine("Chat Server Started. Press enter to exit");
Console.ReadLine();
}
As you can see, the Console.ReadLine() causes it to load and remain
running so it can listen for requests.
What should I do in my Windows service to keep the port open?
Should I just put it in the service constructor?
I want to convert it to a Windows Service.
[STAThread]
static void Main(string[] args)
{
System.Runtime.Remoting.RemotingConfiguration.
Configure("ChatServer.exe.config");
Console.WriteLine("Chat Server Started. Press enter to exit");
Console.ReadLine();
}
As you can see, the Console.ReadLine() causes it to load and remain
running so it can listen for requests.
What should I do in my Windows service to keep the port open?
Should I just put it in the service constructor?