config.web configuration file
All ASP+configuration information includes in configuration files called Config.web. The following example illustrates the structure of an ASP+configuration file:
Code:<!-Config.web File-><configuration>
<configsections>
<add names = httpmodules type = system.web.config.httpmodulesconfighandler/>
<add names = httphandler type = system.web.config.httphandlerconfighandler/>
<add names = sessionState type = system.web.config.SessateConfighandler/>
<add names = globalization type = system.web.config.globalizationconfighandler/>
<! --DDitional Configsection Declarations Go Here->
</Configsections>
<httpmodules>
<!-HTTP Module Subelements Go Here->
</httpmodules>
<httphandler>
<!-Http handlers Subelements
</httphandler>
<sessionState>
<!-Session State Subelements Go Here->
</sessionState>
<globalization>
<!-Session State Subelements Go Here->
</globalization>
<!-AdDitional Config Sections Go Here->
</configuration>
All configuration information must be between <Configuration> and </configuration> tags. There are two main parts of the configuration file. In the upper part, the processing program declaration configured in the section (including <Configsection> and </Configsection> tags). The rest of the file include the actual configuration section (for clear, their sub -elements have been removed). Note that each configuration section below must correspond to a statement in <Configsection>. Each statement gives the configuration name name and pointed out the NGWS Framework Assembly and Class that will process its configuration information. Each configuration section contains child elements containing ASP+detail configuration.
The following code example illustrates these concepts:
Code:<configuration><configsections>
<add name = debugmode type = system.web.config.SINGLETAGSECTIONHANDLER />
<add name = globalization type = system.web.config.singletagSectionhandler />
<add name = assemblies type = system.web.ui.assembliessectionhandler />
<add name = security type = system.Web.config.SecurityConfighandler />
</Configsections>
<debugmode enable = true />
<globalization
Requestencoding = US-ASCII
responsencoding = ISO-8859-1
/>
<assemblies>
<add assembly = System.data.dll/>
<add assembly = System.dll/>
<add assembly = System.drawing.dll/>
<add assembly =*/>
</assemblies>
<SECURITY>
<emorization>
<allow users =* /> <!-all all uters->
</authorization>
</security>
</configuration>
This example illustrates a configuration file that contains four configurations -DEBUGMODE, Globalization, Assemblies, and Security. The following is the settings:
*In the DEBUG section, the debug mode is opened (set to true).
*In the Globalization section, the code method of requests and response is set up.
*In the Assemblies section, four Assemblie added.
*In the Security section, all users are given the right to access.