Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8483795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:12:15+00:00 2026-06-10T20:12:15+00:00

I have a windows service that does one particular job. Now if there were

  • 0

I have a windows service that does one particular job. Now if there were two or more instances (hypothetically speaking) each instance would differ in configuration only, but they would do the same job basically. They’d only be referring to different databases, tables as per configuration.

But I am looking for an approach on how I can increase/decrease the instances of such services? Looking for a small architecture for managing this…

PS: It is very simple to do this in windows azure; the difference being you’d increase/decrease the number of VM instances, and you can configure in database what each VM instance should do.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T20:12:17+00:00Added an answer on June 10, 2026 at 8:12 pm

    I think the problem you’re facing is that multiple instances of services can’t share the same name. The way I work around this is install the instances under different names. You can have your service installer class absorb a parameter:

    [RunInstaller(true)]
    public partial class ProjectInstaller : Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
        }
        public override void Install(IDictionary stateSaver)
        {
            ResolveServiceName();
            base.Install(stateSaver);
        }
    
        private void ResolveServiceName()
        {
            serviceInstaller1.ServiceName = Context.Parameters["ServiceName"];
            serviceInstaller1.DisplayName = Context.Parameters["ServiceName"];
        }
        public override void Uninstall(IDictionary savedState)
        {
            ResolveServiceName();
            base.Uninstall(savedState);
        }
    }
    

    And when you’re installing the service, you provide the ServiceName parameter:

    installutil.exe /ServiceName=foo YourService.exe
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows service that does some intensive work every one minute (actually
We have a .NET Windows Service that occasionally shuts down on one particular server,
I have a windows service that generates logs as it does some execution. I
I have a windows service that runs 24/7 on one of our servers. It
I recently created a Windows service. One thing that it faithfully does is log
I have a WCF service that is hosted on a Windows Service. Now I
I have a Windows service that writes messages to the Event Log. I also
I have a Windows service that runs as a logged-in user (local admin). During
I have a Windows Service that takes the name of a bunch of files
I have a windows service that receives a large amount of data that needs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.