A Chinese explanation of Web. config
ASP. NET beginners may be puzzled by the web. config file. Here is a Chinese explanation of it, hoping to help ASP. NET beginners!
<? XML version = "1.0" encoding = "UTF-8"?>
<Configuration>
<System. Web>
<! -- Dynamic debugging and compilation
Set compilation DEBUG = "true" to set the debug symbol (. PDB Information)
Insert to the compilation page. Because this will create and execute
Slow large file, so this value should be set to true only during debugging, and all other times to false. For more information, see the documentation for debugging ASP. NET files.
-->
<Compilation defaultlanguage = "VB" DEBUG = "true"/>
<! -- Custom error message
Set customerrors mode = "on" or "remoteonly" to enable custom error messages, or set it to "off" to disable custom error messages.
Add the <error> flag for each error to be processed.
-->
<Customerrors mode = "remoteonly"/>
<! -- Authentication
This section sets the application Program Authentication Policy. Possible modes are \ "Windows \", \ "Forms \", \ "Passport \" and \ "None \"
-->
<Authentication mode = "Windows"/>
<! -- Authorization
This section sets the application Authorization Policy. Allow or deny user or role access
Application resources. Wildcard: "*" indicates anyone ,"? "Anonymous
(Unauthorized) user.
-->
<Authorization>
<Allow users = "*"/> <! -- Allow all users -->
<! -- <Allow users = "[comma-separated user list]"
Roles = "[list of roles separated by commas]"/>
<Deny users = "[comma-separated user list]"
Roles = "[list of roles separated by commas]"/>
-->
</Authorization>
<! -- Application-level tracking record
Application-level tracing enables tracing log output for each page in the application.
Set trace enabled = "true" to enable application tracking records. If pageoutput = "true ",
The trace information is displayed at the bottom of each page. Otherwise, you can
Go to the "trace. axd" page to view
Application tracing logs.
-->
<Trace enabled = "false" requestlimit = "10" pageoutput = "false" tracemode = "sortbytime" localonly = "true"/>
<! -- Session Status settings
By default, ASP. NET uses cookies to identify which requests belong to a specific session.
If the cookie is unavailable, you can trace the session by adding the session identifier to the URL.
To disable cookie, set sessionstate cookieless = "true ".
-->
<Sessionstate
Mode = "inproc"
Stateconnectionstring = "TCPIP = 127.0.0.1: 42424"
Sqlconnectionstring = "Data Source = 127.0.0.1; user id = sa; Password ="
Cookieless = "false"
Timeout = "20"
/>
<! -- Globalization
This section sets the global settings of the application.
-->
<Globalization requestencoding = "UTF-8" responseencoding = "UTF-8"/>
</System. Web>
</Configuration>