web.config<?xml version="1.0" encoding="gb2312" ?>
<configuration>
    
  <system.web>    <!--  动态调试编译
          设置 compilation debug="true" 以启用 ASPX 调试。否则,将此值设置为
          false 将提高此应用程序的运行时性能。 
          设置 compilation debug="true" 以将调试符号(.pdb 信息)
          插入到编译页中。因为这将创建执行起来
          较慢的大文件,所以应该只在调试时将该值设置为 true,而在所有其他时候都设置为
          false。有关更多信息,请参考有关
          调试 ASP.NET 文件的文档。
    -->
    <compilation 
         defaultLanguage="c#"
         debug="true"
    />    <!--  CUSTOM ERROR MESSAGES
          Set customError mode values to control the display of user-friendly 
          error messages to users instead of error details (including a stack trace):          "On" Always display custom (friendly) messages  
          "Off" Always display detailed ASP.NET error information.
          "RemoteOnly" Display custom (friendly) messages only to users not running 
          on the local Web server. This setting is recommended for security purposes, so 
          that you do not display application detail information to remote clients.
    -->
    <customErrors 
    mode="RemoteOnly" 
    />     <!--  身份验证 
          此节设置应用程序的身份验证策略。可能的模式是\“Windows\”、\“Forms\”、
          \“Passport\”和\“None\”
    -->
    <authentication mode="None" />     <!--  应用程序级别跟踪记录
          应用程序级别跟踪在应用程序内为每一页启用跟踪日志输出。
          设置 trace enabled="true" 以启用应用程序跟踪记录。如果 pageOutput="true",则
          跟踪信息将显示在每一页的底部。否则,可以通过从 Web 应用程序
          根浏览 "trace.axd" 页来查看 
          应用程序跟踪日志。
    -->
    <trace
        enabled="false"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
localOnly="true"
    />    <!--  会话状态设置
          默认情况下,ASP.NET 使用 cookie 标识哪些请求属于特定的会话。
          如果 cookie 不可用,则可以通过将会话标识符添加到 URL 来跟踪会话。
         若要禁用 cookie,请设置 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="30" 
    />    <!--  全球化
          此节设置应用程序的全球化设置。
    -->
    <globalization 
            requestEncoding="gb2312" 
            responseEncoding="gb2312" 
   />
   
 </system.web></configuration>global.asax
<%@ Application Codebehind="Global.asax.cs" Inherits="Cshope.Global" %>