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 6086757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:47:32+00:00 2026-05-23T11:47:32+00:00

I have a windows service. The idea is to execute as many different tasks

  • 0

I have a windows service. The idea is to execute as many different tasks as possible. Lets say we have this IServicePart interface with Start() and Stop() methods. When the service starts it will search all assemblies in some directory and find all classes which implements IServicePart. Done, no problem.

The problem:

Assembly1.dll is a good candidate for IServicePart. But it needs a configuration. For example Assembly1.dll.config. Now I can copy/paste/rename the dll to task2.dll and task2.dll.config and create a second task for the service. Each of those plugins comes with 10-20 dll dependencies

1) The most obvious problem is how to load the configuration, because the service host’s appDomain is different than assembly1 and task2.

2) I expect issues when I try to load the two IServiceParts when they depend on the same 3rd party assemblies

Solution 1 is to make a custom configuration and not use the app.config.

Solution 2 is to run each plugin in its own appDomain.

What are your suggestions.

Hope I explained this correctly

===================

reference: similar question here: Plugin to use its own app.config

  • 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-05-23T11:47:32+00:00Added an answer on May 23, 2026 at 11:47 am

    The way I’ve done this, involves having each plugin in its own app domain. However, the codebase property of those appdomains continue to point to the root directory where my service exe is located. This achieves two things:

    1. The many tertiary dependencies that the plugins have now don’t need to be duplicated. For example, I can put my logger assembly in the root folder (with the service exe) and all the plugins can see it. This is great, because I neither wish to put my logger assembly into each plugin subdirectory, nor do I wish to use the GAC.

    2. All plugins now share the same app config (the same one used by the service exe). This is a good or bad thing, depending on your needs. But don’t forget the configSource attribute, which can allow you to put specific config sections into seperate config files within your plugin subdirectories.

      Incidentally, I’ve been using MAF for my plugins.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service which is hosted in a Windows Service. This Windows
I have a WCF service hosted in a Windows service. This service the WCF
We have a Windows Service as part of our software, this is used to
I have a windows service that runs various system monitoring operations. However, when running
We have a Windows Service written in C#. The service spawns a thread that
I have a windows service connecting to a SqlServer database on the local box.
I have a Windows Service written in Delphi which runs a number of programs.
I have a windows service I am trying to debug. Is it a bad
I have a windows service that runs fine, but I have to have it
I have a windows service written in C# that acts as a proxy for

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.