Share via


System.Web Configuration Section

Use this section to configure authentication, file level authorization, error display, and to set the site to Debug mode.

Compilation Configuration

The default configuration is:

<compilation defaultLanguage="vb" debug="true">

Set debug="true" to insert debugging symbols (.pdb information) into the compiled page. Since this creates a larger file that runs more slowly, you should set this value to true only when debugging and to false at all other times.

CustomErrors Configuration

The default configuration is:

<customErrors mode="RemoteOnly" defaultRedirect="Customerror.aspx">
  <error statusCode="404" redirect="Notfound.aspx" /> 
</customErrors>

If mode is set to Off, custom error messages will be disabled. Users will receive detailed exception error messages.

If mode is set to On, custom error messages will be enabled.

If mode is set to RemoteOnly, then users will receive custom errors, but users accessing the site locally will receive detailed error messages.

Add an <error> tag for each error you want to handle. The error tag will redirect the user to the Notfound.aspx page when the site returns the 404 (Page not found) error.

Authentication Configuration

Use this section to set the authentication policies of the application. Possible modes are:

  • Windows
  • Forms
  • Passport
  • None

Authorization Configuration

Use this section to control user access to the application.

Examples:

<allow users="*" />   Allow all users 
<allow  users="[comma separated list of users]" roles="[comma separated list of roles]"/>
<deny   users="[comma separated list of users]" roles="[comma separated list of roles]"/>

Globalization Configuration

Use this section to set the globalization settings of the application.

Example:

  <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> 

Copyright © 2005 Microsoft Corporation.
All rights reserved.