The configuration information of the ASP.NET resource is included in a set of configuration files, each file is named Web.config. Each profile contains an XML tag and a sub-tag nested hierarchy with a specified properties that specify configuration settings. Because these tags must be the correct XML of the format, the tags, sub-tags, and attributes are case sensitive. The tagname and attribute name are Camel case, which means that the first character of the tagname is lowercase, and the first letter of any back connection word is capitalized. The attribute value is PASCAL case, which means that the first character is capitalized, and the first letter of any back connection word is also capitalized. True and false exceptions, they are always lowercase.
All configuration information reside between the
Configuration section handler declaration between the
The configuration section setting area is after the
The following Web.config file example declares two configuration
TYPE = "System.configuration.nameValueFileeSectionHandler, System, Version = 1.0.3300.0, Culture = neutral, publickeytoken = b77a5c561934e089 "/> TYPE = "System.Web.SessionState.SessionStateSecionLer, System.Web, Version = 1.0.3300.0, culture = neutral, PublickeyToken = B03F5F7F11D50A3A " Allowdefinition = "MachineToApplication" /> configsections> appsettings> configure> You only need to declare the configuration section handler once. You can place it in the root machine.config file of the server or in the web.config file containing the virtual directory of the web application file. The configuration file in the subdirectory automatically inherits the configuration handler declared in the parent directory. For more information, see Configuring Inheritance. Configuration settings are often nested together under the segment marker. These top-level markers typically indicate the namespaces applied to the configuration settings. For example, the top-level The following example shows the tag nested. Type = "System.net.configuration.NetAutAuthenticationModuleHandler, System, Version = 1.0.3300.0, Culture = Neutral, PublicKeyToken = B77A5C561934E089 "/> TYPE = "System.net.configuration.WebrequestModuleHandler, System, Version = 1.0.3300.0, Culture = Neutral, PublicKeyToken = B77A5C561934E089 "/> sectiongroup>
TYPE = "System.Web.configuration.authorizationConfighandler, System.Web, Version = 1.0.3300.0, culture = neutral, PublicKeyToken = B03F5F7F11D50A3A "/> TYPE = "System.Web.SessionState.SessionStateSecionLer, System.Web, Version = 1.0.3300.0, culture = neutral, PublickeyToken = B03F5F7F11D50A3A " Allowdefinition = "MachineToApplication" /> sectiongroup> configsections>
Allow users = "[comma Separated List of users]" Roles = "[COMMA SEPARATED LIST OF ROLES]" /> Roles = "[COMMA SEPARATED LIST OF ROLES]" /> -> authorization> SqlConnectionstring = "data source = localhost; Integrated security = SSPI; Initial catalog = northwind Cookieles = "false" TIMEOUT = "10" /> configure> The ASP.NET configuration infrastructure does not make any assumptions for the type of configuration data supported by the infrastructure. Configure the section processing program class to process all web.config data. You can use the predefined configuration segment handler with .NET Framework, or you can create your own handlers to handle your own custom configuration data.