Configuration Custom Action: Custom configuration related to route construction

Source: Internet
Author: User

Background

Everyone is very familiar with the configuration file, as for how to play on each other. I stumbled on an open source project to see the cow writing code, which has about the operation of the configuration file aspects. Marvel at the art of the code when, more is sigh, alas! Master really many, I can reach this level, step by step, maybe, 3, 5几 years later brother also became a master, haha. Low-key, must be low-key!

Configuration Custom Action Basics

First of all, I summarized the more superficial code, familiar with the basic operation, and then look at the asp.net mvc in the configuration how to play. As the following illustration shows, let's start with just a few classes and a simpler configuration file (the red box below):

Web.config is as follows:

Code highlighting produced by Actipro Codehighlighter (freeware)
http://www. codehighlighter.com/
    
--> 1 <?xml version= "1.0"?>
<configuration>
    <configsections >
        <section name= "democonfiguration" type= "Core.Configuration.Operation.DemoConfigurationSection, Core.configuration "/>
    </configSections>
    <democonfiguration configsource=" Config\demo.config "/>
    <system.web>
        <compilation debug=" true "targetframework=" 4.0 "/>
    </system.web >
</configuration>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.