NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Config.web Configuration Files

All configuration information for ASP+ is contained in configuration files named Config.web. The following example illustrates the structure of an ASP+ configuration file:

<!-- 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 HERE -->
     </configsections>

   <httpmodules>
      <!-- http module subelements go here -->
   </httpmodules>

   <httphandlers>
      <!-- http handlers subelements go here -->
   </httphandlers>

   <sessionstate>
      <!-- session state subelements go here -->
   </sessionstate>

   <globalization>
      <!-- session state subelements go here -->
   </globalization>

   <!-- ADDITIONAL CONFIG SECTIONS GO HERE -->

</configuration>

All configuration information must reside between the <configuration> and </configuration> tags. There are two main parts to the file. At the top are the configuration section handler declarations (contained within the <configsection> <\configsection> tags). The rest of the file contains the actual configuration sections (for clarity, their subelements have been removed). Notice that there must be one <configsection> declaration for each configuration section that follows it. Each declaration gives the configuration section name and indicates the NGWS frameworks assembly and class that will handle that configuration information. Each configuration section contains subelements that contain the configuration settings for that particular area of ASP+.

The following code illustrates these concepts:

<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 containing four configuration sections - debugmode, globalization, assemblies, and security. The following settings are established: