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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:33:00+00:00 2026-05-27T22:33:00+00:00

Short version: I’m making a DLL that I intend to pass around the department,

  • 0

Short version:
I’m making a DLL that I intend to pass around the department, and it requires certain values to be present in the web.config of the app that references it. Is there any way to make my DLL check for these values before run time?

Long version, with background info:
We’re using website-level web.config files to configure environment information for multiple websites/WCF services on the same server. When developing these apps, I have the debug versions of the web.config insert test values, and all is well. However, I’d like to reduce the hidden requirement as much as possible for future users [me, in a year, when I forget all this] and make missing config settings as obvious as possible. If a reference or build time solution is impossible or unfeasible, what’s the earliest run-time opportunity my DLL can hook into to check its configuration?

Also- we’re using the built-in application configuration classes to decrypt settings automatically at run time, as well as taking advantage of the configuration hierarchy, so we’re locked into using app/web.config files. If anyone knows a more solid way of designing the system with regards to referenced assemblies requiring configuration entries, I would appreciate suggestions.

  • 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-27T22:33:00+00:00Added an answer on May 27, 2026 at 10:33 pm

    There is no real Main equivalent for a DLL. The best option is to guard all of your DLL entry points with the method that will validate the configuration (and presumably cache the result).

    Unfortunately depending on the contents of your DLL this can be quite time consuming. The best way to start is looking at all of the public types and static methods. These are your most obvious entry points to the code base.

    This may also be a good time to review your entry points and limit them to a managable level 🙂

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

Sidebar

Related Questions

Short version: Can I replace the derby.jar that came with my JDK (from Oracle)
Short Version: If I create a System.Web.HttpException as follows: var exception = new HttpException(403,
Short Version I want an ADPlus script that will do a full memory dump
Short version: How can I get a regex that matches a@a.aaaa but not a@a.aaaaa
Short Version (tl;dr): Is there an open source or commercial engine that provides embeddable
Short Version If I update the Model object that my ViewModel wraps, what's a
Short version : How can an MFC ActiveX control loaded into a web page
Short version: I want to trigger the Form_Load() event without making the form visible.
Short version: I need mysql code that will change [href=http://a-random-domain.com]hyperlink[/href] into <a href=http://a-random-domain.com>hyperlink</a> without
Short version: i've added <system.web> <system.diagnostics> <trace> <listeners> <add name=WebPageTraceListener type=System.Web.WebPageTraceListener, System.Web, Version=2.0.3600.0, Culture=neutral,

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.