asp+| concept
config.web configuration file
All asp+ configuration information is included in the configuration file named Config.web. The following example illustrates the structure of a asp+ configuration file:
Code:
<!--CONFIG. WEB FILE-->
<configuration>
<configsections>
<add names= "httpmodules" type= "System.Web.Config.HttpModulesConfigHandler"/>
<add names= "httphandlers" type= "System.Web.Config.HttpHandlerConfigHandler"/>
<add names= "sessionstate" type= "System.Web.Config.SessionStateConfigHandler"/>
<add names= "Globalization" type= "System.Web.Config.GlobalizationConfigHandler"/>
<!--ADDITIONAL configsection DECLARATIONS Go-->
</configsections>
<!--http Module subelements go-->
<!--http handlers subelements go-->
<sessionstate>
<!--session state subelements Go-->
</sessionstate>
<globalization>
<!--session state subelements Go-->
</globalization>
<!--ADDITIONAL CONFIG SECTIONS Go-->
</configuration>
All configuration information must reside between the <configuration> and </configuration> tags. The configuration file has two main sections. At the top are the handler declarations for the configuration section (included in the <configsection> and </configsection> tags). The remainder of the file includes the actual configuration section (in order to be clear, their child elements have been removed). Note that each of the following configuration subsections must exist for a declaration that should have a <configsection>. Each declaration gives the configuration section name and indicates the NGWS Framework assembly and class that will process its configuration information. Each configuration section contains child elements that contain asp+ detail configuration settings.
The following code 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"
Responseencoding= "Iso-8859-1"
/>
<assemblies>
<add assembly= "System.Data.dll"/>
<add assembly= "System.dll"/>
<add assembly= "System.Drawing.dll"/>
<add assembly= "*"/>
</assemblies>
<security>
<authorization>
<allow users= "*"/> <!--allow all users-->
</authorization>
</security>
</configuration>
This example illustrates a configuration file that contains four configuration sections--debugmode,globalization,assemblies and security. The following are the settings that have been established:
* In the Debug section, Debug mode is turned on (set to true).
* In the globalization section, the encoding of the request and response (Response) is set.
* In the Assemblies section, four Assemblie were added.
* In the Security section, all users are given access rights.