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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:11:33+00:00 2026-05-29T10:11:33+00:00

Currently I have a web service, which loads up any plugins located within its

  • 0

Currently I have a web service, which loads up any plugins located within its /plugins folder. Now the problem is that each plugin has its own set of configuration data, currently hardcoded and isolated into a single class, but I want to move this out into a myplugin.config file.

Normally the web service loads up its own web.config file, but I am not sure if I can get the plugins to use their own ones. As if you imagine the main web service uses NHibernate and does CRUD stuff with some arbitrary data, but one of the plugins adds a caching layer using MongoDB and has its own connection string details. So the MVC web service shouldn’t really care about these settings, it should just be the MyPlugin which would need to read them.

Is there any way to do this? As I just want to get away from having the connection string ingrained within the code.

  • 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-29T10:11:33+00:00Added an answer on May 29, 2026 at 10:11 am

    I have sorted this problem now, I was able to do it without much work really once I found out how config files could be loaded in.

    I made sure my config file was named after the assembly loaded via MEF, so if my assembly was:

    • some-custom-plugin.dll

    You would make a config file named:

    • some-custom-plugin.dll.config

    then you would call:

    var config = ConfigurationManager.OpenExeConfiguration("some-custom-plugin.dll");
    var someValue = config.AppSettings["some-app-setting"];
    

    So hope this helps someone as it took me a while to find this simple thing out.

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

Sidebar

Related Questions

I have a C# web service which currently communicates with a Flex app using
I have the WSDL for a web service that I cannot currently connect to.
I have a currency converter application for iphone which uses web service. The web
I want to build a REST web service on app engine. Currently i have
I have an internal enterprise app that currently consumes 10 different web services. They're
I currently have a web form aspx page that calls RegisterClientScriptBlock. This sends down
I currently have an asp.net website hosted on two web servers that sit behind
I have a VS2005 project that contains a couple web service references. The project
I am currently in the process of developing a Web Service which should expose
I have an application.war folder (not as file) which contains jaxen-1.1.1.jar (in the WEB-INF/lib)

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.