ASP.NET Configuration Web.Config Files Elements
Posted by Praveen Kumar on April 5, 2008
The elements in this schema tell us how our ASP.NET web application is going to behave.
Note: Default values are for your server can be found in your Machine.Config file that is located in ..\Microsfot.Net\Framework\version#\config\Machine.config
The root element of your configuration file is <configuration>:
The following is a overview of all the XMl files Elements (Schema) in your Web.Config file:
<configuration> <location> <system.web> <authentication> <forms> <credentials> <passport> <authorization> <allow> <deny> <browserCaps> <result> <use> <filter> <case> <clientTarget> <add> <remove> <clear> <compilation> <compilers> <compiler> <assemblies> <add> <remove> <clear> <customErrors> <error> <globalization> <httpHandlers> <add> <remove> <clear> <httpModules> <add> <remove> <clear> <httpRuntime> <identity> <machineKey> <pages> <processModel> <securityPolicy> <trustLevel> <sessionState> <trace> <trust> <webServices> <protocols> <add> <remove> <clear> <serviceDescriptionFormatExtensionTypes> <add> <remove> <clear> <soapExtensionTypes> <add> <clear> <soapExtensionReflectorTypes> <add> <clear> <soapExtensionImporterTypes> <add> <clear> <WsdlHelpGenerator> </webServices> </system.web> </location> </configuration>
Configuration files as you know are in XML format. The actual schema for all three of Machine Configuration files, Application configuration and security configuration files is broken down to the following elements:
The child elements are:
This setting specifies what version of the CLR your application will run
Elements include: requiredRuntime, supportedRuntime
The runtime settings specificy how the CLR will handle garbage collection along with the version of the assembly to use
Elements include: assemblybinding, assemblyIdentity, bindingRedirect, codeBase, dependantAssembly, devleopmentMode, gcConcurrent, probling, publisherPolicy, qualifyAssembly, runtime
This section allows you to put custom settings in remoting application configuration files
Elements include: system.runtime.remoting, application, lifetime, channels, serverProviders, formatter, client, wellknown, activiated, service, interopXmlType, preload, channelSinkProviders, provider, debug and customErrors
Determines how the .NET framework will connect to the internet.
Elements include: authenticationModules, connectionModules, defaultProxy, system.net, webRequestModules
Specifies how to map algorithm names to classes that implement the cryptography algorithms.
Elements include: cryptoClasses, cryptoClass, cryptoghraphySettings, mscorlib, nameEntry, oidEntry, oidMap
Elements for custom settings in configuration files
Elements include: add, appSettings, clear, configSections, remove, section, sectionGroup
Trace and Debug Settings
Tracing and Debugging settings that specify how trace listerners will collection and route messages and also at what levels the tracing listerners are set
Elements include: add, assert, listeners, remove, switches, system.diagnostics, trace
Contains elements that control how your ASP.NET Web application will react. Please refer to your machine.config for default settings.
Elements include: system.web, add, allow, assemblies, authentication, authorization, broswerCaps, case, clear, clientTarget, compilation, compiler, credentials, customErrors, deny, error, filter, forms, globalization, httpHandlers, httpModules, httpRuntime, identity, location, machineKey, pages, passport, processModel, protocols, remove, result, securityPolicy, sessionState, soapExtensionImporterTypes, soapExtensionReflectorTypes, soapExtensionTypes, trace, trust, trustLevel, use, user, webServices, WsdlHepGenerator.