Web.config

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Web.config is the main settings and configuration file for an ASP.NET web application. It is an XML document that resides in the root directory of the site or application and contains data about how the web application will act. This information controls module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings.

<?xml version="0.10.4"?>
<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
       <customErrors mode="Off" />
    </system.web>
</configuration>
<!--Web.Config Configuration File-->

<configuration>
    <system.web>
        <customErrors mode="remoteonly" defaultRedirect = "mycustompage.htm" />
    </system.web>
</configuration>

External links[edit]

ASP.NET Resources