ASP. NET web. config Configuration Overview

Source: Internet
Author: User

System. Web elements (ASP. NET setting Architecture)

<System. Web> <anonymousidentification> Configure an anonymous ID for application authorization. This is required to identify entities that have not been authenticated when authorization is required. <Authentication> Configure ASP. NET authentication support <authorization> Configure ASP. NET authorization support. <Browsercaps> Configure the browser function component. <Caching> Configure cache settings for Web applications. <Clienttarget> Add the alias of a specific user proxy to the internal set of the user proxy alias. <Compilation> contains all compilation settings used by ASP. NET. <Customerrors> defines custom error information for ASP. NET applications. <Deployment> defines configuration settings used to support web application deployment. <Devicefilters> specify the devices or devices in the ASP. NET lelecapabilities class based on the user agent or browser. Page or application developers can use device filters to override control properties or define content blocks or template blocks to change the layout and appearance. <Globalization> Configure the global settings of the application. <Healthmonitoring> Configure applications for health monitoring. <Hostingenvironment> defines the configuration settings used to control the behavior of the application host environment. <Httpcookies> Configure attributes for cookies used by web applications. <Httphandlers> maps incoming URL requests to the ihttphandler class. <Httpmodules> add, remove, or clear the HTTP module in the application. <Httpruntime> Configure ASP. net http runtime settings. This section can be declared at the computer, site, application, or subdirectory level. <Identity> controls the Application ID of a Web application. <Machinekey> Configure the key used to encrypt and decrypt Forms authentication cookie data. This section allows you to configure a verification key, which performs message authentication checks on view status data and forms authentication tickets. This section can be declared at the computer, site, or application level, but not at the subdirectory level. <Membership> Configure parameters for ASP. NET membership to manage user accounts and authenticate user accounts. <Mobilecontrols> defines the adapter set to map the ASP. NET mobile control to the corresponding adapter in the system. web section of the web. config configuration file. <Pages> identifies page-specific configuration settings. <Processmodel> Configure ASP. NET process model settings on the Internet information service (IIS) Web server system. <Profile> use the ASP. NET configuration file to configure parameters used to manage user values. <Rolemanager> Configure applications for role management. This element is a new element in. NET Framework 2.0. <SecurityPolicy> defines the effective ing between the naming security level and the policy file. This section can be declared at the computer, site, or application level. <Sessionpagestate> set the view status on the ASP. NET application configuration page. <Sessionstate> Configure the session Status Module. <Sitemap> the configuration navigation infrastructure supports configuring, storing, and rendering site navigation. <Trace> Configure ASP. NET tracking service. <Trust> Configure the code access security permission set used to run a specific application. This section can be declared at the computer, site, and application level. <Urlmappings> defines a ing that hides the actual URL and maps it to a URL that is easier to remember. <Webcontrols> specify the sharing location of the client script file. <Webparts> specify the Web Part personalized settings provider, set personalized settings authorization, and add custom classes (used to extend the webparttransformer class for Web part connection ). <WebServices> controls the settings of XML Web Services created using ASP. NET. <Xhtmlconformance> Configure the display of controls that comply with XHTML 1.0. </System. Web> The following is a more detailed web. config configuration file based on vs2008 ----------------------------------------- <? XML version = "1.0"?> <! -- Note: In addition to manually editing this file, you can also use web management tools to configure application settings. You can use the "website"-> "ASP. NET configuration" option in Visual Studio. The complete list of settings and comments is in machine. config. Comments. This file is usually located in/Windows/Microsoft. NET/framework/v2.x/config --> <! -- Configuration root configuration section --> <configuration> <! -- Configsections processing declaration configuration section --> <configsections> <! -- Sectiongroup group set custom group --> <sectiongroup name = "system. web. extensions "type =" system. web. configuration. systemwebextensionssectiongroup, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "> <! -- Scripting script language; script writing; script processing --> <sectiongroup name = "scripting" type = "system. web. configuration. scriptingsectiongroup, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "> <! -- ASP.. Net Ajax applications can compress or cache client script files during runtime, define a new <section> name in <sectiongroup name = "scripting"> scriptresourcehandler --> <section name = "scriptresourcehandler" type = "system. web. configuration. scriptingscriptresourcehandlersection, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> <! -- In ASP.. Net Ajax Applications Support Web service configuration --> <sectiongroup name = "WebServices" type = "system. web. configuration. scriptingwebservicessectiongroup, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "> <! -- If ASP.. Net Ajax applications require custom JSON conversion methods, the corresponding <section> name is called jsonserialization --> <section name = "jsonserialization" type = "system. web. configuration. scriptingjsonserializationsection, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" everywhere "/> <! -- If ASP.. Net Ajax applications need to access ASP.. NET provides user personalized information services, the <section> name is profileservice --> <section name = "profileservice" type = "system. web. configuration. scriptingprofileservicesection, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> <! -- If ASP.. Net Ajax applications need to access ASP.. Net user identity authentication service, you should define such a <section> name in <sectiongroup name = "WebServices"> authenticationservice --> <section name = "authenticationservice" type = "system. web. configuration. scriptingauthenticationservicesection, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> <! -- If ASP. net supports role services --> <section name = "roleservice" type = "system. web. configuration. scriptingroleservicesection, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "requirepermission =" false "allowdefinition =" machinetoapplication "/> </sectiongroup> </configsections> <! -- Configure Ajax web extension Ajax webconfig --> <system. Web. Extensions> <scripting> <WebServices> </WebServices> <! -- The following statement compresses the size of the client script library when the program runs in release mode. If not, we should definitely add this HTTP module to improve network transmission speed --> <scriptresourcehandler enablecompression = "true" enablecaching = "true"/> </scripting> </system. web. extensions> <! -- Custom configuration section --> <appsettings> <add key = "mybank. mybankservice "value =" http: // localhost/firstwebservice/system/mybankservice. asmx "/> </appsettings> <! -- Connectionstrings connection string configuration section can add multiple connections to multiple databases. This string can be encrypted --> <connectionstrings> <Add name = "mybookshop" connectionstring = "Data Source = IP address; initial catalog = database name; user id = sa; Pwd = "providername =" system. data. sqlclient "/> </connectionstrings> <! -- System. Web ASP. Net configuration settings control Asp.net runtime behavior --> <system. Web> <! -- Configure webpage download --> </System. web> <system. codedom> <compilers> <compiler language = "C #; CS; CSHARP" extension = ". CS "WarningLevel =" 4 "type =" Microsoft. CSHARP. csharpcodeprovider, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089 "> <provideroption name =" compilerversion "value =" v3.5 "/> <provideroption name =" warnaserror "value =" false "/> </compiler> <compiler language = "VB; vbs; VisualBasic; VBScript "extens Ion = ". VB "WarningLevel =" 4 "type =" Microsoft. visualBasic. vbcodeprovider, system, version = 2.0.0.0, culture = neutral, publickeytoken = b77a5c561934e089 "> <provideroption name =" compilerversion "value =" v3.5 "/> <provideroption name =" optioninfer "value =" true "/> <provideroption name =" warnaserror" value = "false"/> </compiler> </compilers> </system. codedom> <! -- The system. webserver Section is required to run ASP. NET Ajax under Internet Information Service iis7.0. This section is not required for earlier versions of IIS. --> <! -- Define <system. web. extensions> This configuration node is a configuration sub-element for the Web server, and defines a level that matches the preceding <sectiongroup>, as shown below: --> <system. webserver> <validation validateintegratedmodeconfiguration = "false"/> <modules> <remove name = "scriptmodule"/> <! -- Configure the global script controller for the Web Service --> <Add name = "scriptmodule" precondition = "managedhandler" type = "system. web. handlers. scriptmodule, system. web. extensions, version = 3.5.0.0, culture = neutral, publickeytoken = Taobao "/> </modules>

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.