⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 web.config

📁 一个非常好的开源代码
💻 CONFIG
字号:
<?xml version="1.0" encoding="gb2312" ?>
<configuration>
    
  <system.web>

    <!--  动态调试编译
          设置compilation debug="ture" 以启用ASP调试.否则,将此值设置为false将提高此应用程序的性能.
          设置compilation debug="ture" 以将调试符号(.pdb 信息)插入到编译页中.因为这将创建执行起来较慢的大文件,
          所以应该只在调试时将该值设为true,而在所有其他时候都设置false.有关更多的信息,请参考有关调试ASP.NET文件的文档
    -->
    <compilation 
         defaultLanguage="c#"
         debug="true"
    />

    <!--  自定义错误信息
          设置 customErrors 模式值可控制映向
          用户显示用户友好错误信息而不是错误详细信息(包括堆栈跟踪信息):
          "On" 始终显示自定义(友好的)信息
          "Off" 始终显示详细的ASP.NET错误信息
          "RemoteOnly" 只对不在本地Web服务器上运行的用户显示自定义(友好的)信息.出于安全目的,建议使用此设置,以便不向远程客户 
          端显示应用程序的详细信息
          
          CUSTOM ERROR MESSAGES
          Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. 
          Add <error> tags for each of the errors you want to handle.

          "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 
          This section sets the authentication policies of the application. Possible modes are "Windows", 
          "Forms", "Passport" and "None"

          "None" No authentication is performed. 
          "Windows" IIS performs authentication (Basic, Digest, or Integrated Windows) according to 
           its settings for the application. Anonymous access must be disabled in IIS. 
          "Forms" You provide a custom form (Web page) for users to enter their credentials, and then 
           you authenticate them in your application. A user credential token is stored in a cookie.
          "Passport" Authentication is performed via a centralized authentication service provided
           by Microsoft that offers a single logon and core profile services for member sites.
    -->
    <authentication mode="Windows" /> 

	<!--  AUTHORIZATION 
          This section sets the authorization policies of the application. You can allow or deny access
          to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous 
          (unauthenticated) users.
    -->

    <authorization>
        <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]"/>
            -->
    </authorization>

    <!--  应用程序级别跟踪记录
          应用程序级别跟踪在应用程序内为每一页启用跟踪日志输出.
          设置 trace enable="true" 以启用应用程序跟踪记录.如果 pageOutput="true",则跟踪信息将显示在每一页的底部. 否则,可以通过 WEB 应用程序跟浏览 "trace.axd"
          页来查看应用程序跟踪日志
          
          APPLICATION-LEVEL TRACE LOGGING
          Application-level tracing enables trace log output for every page within an application. 
          Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
          trace information will be displayed at the bottom of each page.  Otherwise, you can view the 
          application trace log by browsing the "trace.axd" page from your web application
          root. 
    -->
    <trace
        enabled="false"
        requestLimit="10"
        pageOutput="false"
        traceMode="SortByTime"
		localOnly="false"
    />

    <!--  会话状态设置
          默认情况下,ASP.NET 使用 cookie 标志哪些请求属于特定的会话.
          如果 cookie 不可用,则可以通过将会话标志符添加到 URL 来跟踪会话.
          若禁用 cookie,请设置 sessionState cookieless="true".
          
          SESSION STATE SETTINGS
          By default ASP.NET uses cookies to identify which requests belong to a particular session. 
          If cookies are not available, a session can be tracked by adding a session identifier to the URL. 
          To disable cookies, set sessionState cookieless="true".
    -->
    <sessionState 
            mode="InProc"
            stateConnectionString="tcpip=127.0.0.1:42424"
            sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
            cookieless="false" 
            timeout="600" 
    />

    <!--  全球化
          此节设置应用程序的全球化设置
          GLOBALIZATION
          This section sets the globalization settings of the application. 
    -->
    <globalization 
            requestEncoding="gb2312" 
            responseEncoding="gb2312" 
   />
   
 </system.web>
  <!--  自定义设置
        设置数据库连接参数. 
    -->
 <appSettings>
        <add key="rbConnection" value="uid=freebegin;pwd=19821110;server=61.152.104.71;database=freebegin" ></add>
 </appSettings>

</configuration>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -