msd 5 Posted April 15, 2023 Hello, I would like to develop a KBMMW-based Windows Service Application. So I need a little assistance with this idea, with code for starting and monitoring KBMMW components. KBMMW is some kind of middleware framework that connects to databases and provides server connections to clients. So, I need to develop a classic Windows service application, which has a part where I need to register services and start the KBMMW Server listener to true. Do I need to execute the main thread of the service app because the KBMMW server is a listener on the port by itself, and is it ok to put this part of the code (registration services) in the service start event handler? Thanks in advance... Share this post Link to post
PeterBelow 239 Posted April 16, 2023 13 hours ago, msd said: Hello, I would like to develop a KBMMW-based Windows Service Application. So I need a little assistance with this idea, with code for starting and monitoring KBMMW components. KBMMW is some kind of middleware framework that connects to databases and provides server connections to clients. So, I need to develop a classic Windows service application, which has a part where I need to register services and start the KBMMW Server listener to true. Do I need to execute the main thread of the service app because the KBMMW server is a listener on the port by itself, and is it ok to put this part of the code (registration services) in the service start event handler? Thanks in advance... You can only put code in the OnStart event handler that executes fast and does not block the thread, otherwise it will prevent the service from starting because the service manager runs into a timeout waiting for the event handler to return. Better just create a secondary thread in OnStart and do all other work in/from its Execute method. 1 Share this post Link to post