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

  • Home
  • SEARCH
  • 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 634785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:20:00+00:00 2026-05-13T20:20:00+00:00

So this a new one for me. I’m trying to define a ConfigurationSection class

  • 0

So this a new one for me.

I’m trying to define a ConfigurationSection class in my class library that pulls from App.Config in my WinForms app. I’ve never done this before but from following examples this is where I’ve got to.

app.config in my WinForms app

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="ReportEngineConfig" type="Optima.ReportEngine.ReportEngineConfig" allowDefinition="Everywhere" allowLocation="true"/>
  </configSections>

  <ReportEngineConfig>
    <ReportObjectVariableRegEx value="test" ></ReportObjectVariableRegEx>
  </ReportEngineConfig>
</configuration>

And my ConfigurationSection class in my seperate class library.

using System.Configuration;

namespace Optima.ReportEngine
{
    public class ReportEngineConfig : ConfigurationSection
    {
        [ConfigurationProperty("ReportObjectVariableRegEx")]
        public string ReportObjectVariableRegEx
        {
            get
            {
                return (string)this["value"];
            }
        }

    }
}

So any chance anyone can point out where I’ve gone wrong

Thanks!

  • 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-13T20:20:01+00:00Added an answer on May 13, 2026 at 8:20 pm

    Your type tag needs to reference the assembly name, not just the type name:

    type="Optima.ReportEngine.ReportEngineConfig, Optima.ReportEngineAssembly"
    

    Where the section after the comma is the name of the assembly containing ReportEngineConfig. You’ll also have to make sure the application that is using this app.config has referenced the same assembly containing ReportEngineConfig.

    Also you can get rid of the allowDefinition and allowLocation tags… you’ve put the defaults in.

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

Sidebar

Related Questions

This concept is a new one for me -- I first came across it
this query will just one row as a result myDataContext db = new myDataContext();
I am using a route like this one: routes.MapRoute(Invoice-New-NewCustomer, Invoice/New/Customer/New/{*name}, new { controller =
Many years ago I remember a fellow programmer counselling this: new Some::Class; # bad!
This is a new gmail labs feature that lets you specify an RSS feed
I keep reading about how great this new Canvas element for HTML5 is and
I just started to read about this new technology... Does someone have some knowledge
Soooo, I am starting this new job soon where most of the code is
Or is it okay to do something like this: new Thread( new ThreadStart( delegate
This concept is new to me, and a colleague suggested it. Sadly, I had

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.