Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
please suggest below scenario.

I have a logic which will do co-relation operation and send a mail to the concern person. Also we are dealing with many clients so i can't have single exe to perform for all customer. Hence i should have separate exe for each customer but inside logic is going to be same for all.

I am planning to do as C# windows service.Is this a right approach or any other way where i can have a single build for all clients.

What I have tried:

currently we are using C# windows service exe for each client i need to separately shedule in task sheduler.Its very difficlut when we are migrating any patch
Posted
Updated 28-Mar-17 4:23am
v2
Comments
_Asif_ 28-Mar-17 1:51am    
Why can't you have a single EXE to perform for all customers?
Tomas Takac 28-Mar-17 2:31am    
I'm afraid you need to explain more your deployment scenario. Why you need multiple services? How are you using scheduler with the services? Why is it so difficult to apply patches?
Member 10535790 28-Mar-17 2:56am    
Hi Tomas,

Actually we will receive events/alerts from different customer and do some co relation and send a mail to respective engineer. i can't have a single exe reason is receiving mail from each customer is huge.so i am running windows exe for each customer which will run every one minute and do the functionality

Tomas Takac 28-Mar-17 4:52am    
I'm sorry but I don't think I can help you. I suggest you add more details to your question (use Improve question to do that). You are asking a question about architecture so you should clearly explain your current architecture and the shortcomings thereof. You can also explain the improvement you have in mind and how it addresses the problem. But most importantly be clear about the problem at hand and your doubts about the current and proposed solution.
Member 10535790 28-Mar-17 5:49am    
hope its clear you at any cost i want to have multiple exe but which all are connected same business logic. i thought to separate Business logic into some DLL or webapi .please suggest

1 solution

Assuming the programs are all doing exactly the same thing but need to know which customer they are performing the actions for then you can just installed the service multiple times with a subtly different name and pass it a parameter so it knows which customer.

See c# - How to make a Windows service with parameters? - Stack Overflow[^] for some suggestions.

I've done something similar but the services were running continuously (not scheduled) and utilised filewatchers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900