Which of the following tags are required for the web.config file so that it executes properly in an
ASP.NET application? Each correct answer represents a complete solution. Choose all that apply.
A.
customErrors
B.
system.web
C.
configuration
D.
sessionState
Explanation:
Web.config is the main settings and configuration file for an ASP.NET Web application. The file is an
XML document that defines configuration information regarding the Web application. It contains
information that control 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. The example of Web.config is as follows:
<configuration>
<system.web>
<customErrors mode=”off” defaultRedirect=”mycustompage1.htm”/>
</system.web>
</configuration>
Answer A is incorrect. customErrors is not a required tag for the web.config file.
Answer D is incorrect. sessionState is an invalid tag for the web.config file.