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

The Archive Base Latest Questions

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

I created a custom section in the web.config file but it isn’t able to

  • 0

I created a custom section in the web.config file but it isn’t able to load my custom type that is going to manage the section.

Here are the definitions:

<configSections>
<section
        name="MembershipProviders"
        type="MyApp.BusinessObjects.MembershipProviderFactory.MembershipProvidersSection"
        allowLocation="true"
        allowDefinition="Everywhere"
      />
</configSections>


namespace MyApp.BusinessObjects
{
    public class MembershipProviderFactory
    {
        internal virtual IMembershipProvider Create()
        {
        }

        public class MembershipProvidersSection : ConfigurationSection
        {
            public class AddElement: ConfigurationElement
            {
                [ConfigurationProperty("name", IsKey  = true, IsRequired = true)]
                public string Name
                {
                    get
                    {
                        return this["name"].ToString();
                    }
                    set
                    {
                        this["name"] = value;
                    }
                }

                [ConfigurationProperty("type", IsRequired = true)]
                public string FullyQualifiedTypeName
                {
                    get
                    {
                        return this["type"].ToString();
                    }
                    set
                    {
                        this["type"] = value;
                    }
                }
            }

            public class AddElementCollection : ConfigurationElementCollection
            {
                protected override ConfigurationElement CreateNewElement()
                {
                    return new AddElement();
                }

                protected override object GetElementKey(ConfigurationElement element)
                {
                    return ((AddElement)element).Name;
                }
            }


            [ConfigurationProperty("currentProvider", IsRequired = false)]
            public string CurrentProvider
            {
                get
                {
                    return this["currentProvider"].ToString();
                }
                set
                {
                    this["currentProvider"] = value;
                }
            }

            [ConfigurationProperty("add", IsRequired = true, IsDefaultCollection = true)]
            public AddElementCollection Instances
            {
                get { return (AddElementCollection)this["add"]; }
                set { this["add"] = value; }
            }
        }
    }
}

I get a run-time exception that says:

An error occurred creating the configuration section handler for MembershipProviders: Could not load type ‘MyApp.BusinessObjects.MembershipProviderFactory.MembershipProvidersSection’.

Update

I also included the actual section in the config file as follows:

<MembershipProviders currentProvider ="DefaultMembershipProvider" />

I still get the same exception.

  • 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-15T20:34:43+00:00Added an answer on June 15, 2026 at 8:34 pm

    You need to specify the assembly name as part of the type attribute:

    <section
        name="MembershipProviders"
        type="Namespace.TheCustomSection, TheAssemblyNameGoesHere"
        allowLocation="true"
        allowDefinition="Everywhere"
    />
    

    EDIT
    I didn’t notice that the MembershipProvidersSection class is a nested class.
    The type name should be:

    MyApp.BusinessObjects.MembershipProviderFactory+MembershipProvidersSection
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've create a custom configuration section in my web.config file for my 3.5 web
how to create and use a custom section in web.config ?
I am trying to define custom settings in my web.config file and I'm pretty
I've created a custom config section for my application. For some reason Visual Studio
I added a custom section to my app.config file for a Windows Forms Application.
For configuring my ASP.Net Application I'm using Custom Configuration Sections in my web.config. But
I have created a custom config section to store a list of of items.
Suppose I created a custom web application that consists of: several assembly DLLs: web
I have created a custom cell that contain a Label but when I added
i have created the new custom config TAB in admin panel configuration section under

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.