How to make a Windows service with parameters?

后端 未结 5 933
庸人自扰
庸人自扰 2020-12-31 07:33

I have written a Windows service, of which I want to have 1 instance running per customer. This is because the customers each have their own DB with identical schemas; the

5条回答
  •  [愿得一人]
    2020-12-31 07:49

    Wil Peck wrote a good article about how to install multiple instances of a windows service on a single box. The basic idea is that you have to trick the installer into thinking they are different services by giving them different names.

    Having said that, it seems like it would be easier (and more maintainable) to redesign your database connection code so that it can support multiple worker threads.

提交回复
热议问题