home *** CD-ROM | disk | FTP | other *** search
/ Programming Microsoft Visual Basic .NET / Programming Microsoft Visual Basic .NET (Microsoft Press)(X08-78517)(2002).bin / 24 aspnet applications / aspnetsecurity / web.config < prev   
Encoding:
Extensible Markup Language  |  2002-02-27  |  3.3 KB  |  80 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <configuration>
  3.     
  4.   <system.web>
  5.  
  6.     <!--  DYNAMIC DEBUG COMPILATION
  7.           Set compilation debug="true" to insert debugging symbols (.pdb information)
  8.           into the compiled page. Because this creates a larger file that executes
  9.           more slowly, you should set this value to true only when debugging and to
  10.           false at all other times. For more information, refer to the documentation about
  11.           debugging ASP.NET files.
  12.     -->
  13.     <compilation defaultLanguage="vb" debug="true" />
  14.  
  15.     <!--  CUSTOM ERROR MESSAGES
  16.           Set customErrors mode="On" or "RemoteOnly" to enable custom error messages, "Off" to disable. 
  17.           Add <error> tags for each of the errors you want to handle.
  18.     -->
  19.     <customErrors mode="RemoteOnly" />
  20.  
  21.     <!--  AUTHENTICATION 
  22.           This section sets the authentication policies of the application. Possible modes are "Windows", 
  23.           "Forms", "Passport" and "None"
  24.     -->
  25.     <authentication mode="Forms">
  26.         <forms name="MyOwnSite"  path="/" loginUrl="LoginPage.aspx" 
  27.           protection="All"  timeout="10">
  28.         <credentials passwordFormat="Clear" >
  29.             <user name="JoeDoe" password="jdpwd" />
  30.             <user name="AnnSmith" password="aspwd" />
  31.         </credentials>
  32.         </forms>
  33.      </authentication>
  34.      
  35.     <!--  AUTHORIZATION 
  36.           This section sets the authorization policies of the application. You can allow or deny access
  37.           to application resources by user or role. Wildcards: "*" mean everyone, "?" means anonymous 
  38.           (unauthenticated) users.
  39.     <allow     users="[comma separated list of users]"
  40.                              roles="[comma separated list of roles]"/>
  41.                   <deny      users="[comma separated list of users]"
  42.                              roles="[comma separated list of roles]"/>
  43.             -->
  44.     <authorization>
  45.         <deny users="AnnSmith" />
  46.         <deny users="?" /> 
  47.     </authorization> 
  48.  
  49.     <!--  APPLICATION-LEVEL TRACE LOGGING
  50.           Application-level tracing enables trace log output for every page within an application. 
  51.           Set trace enabled="true" to enable application trace logging.  If pageOutput="true", the
  52.           trace information will be displayed at the bottom of each page.  Otherwise, you can view the 
  53.           application trace log by browsing the "trace.axd" page from your web application
  54.           root. 
  55.     -->
  56.     <trace enabled="false" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
  57.  
  58.  
  59.     <!--  SESSION STATE SETTINGS
  60.           By default ASP.NET uses cookies to identify which requests belong to a particular session. 
  61.           If cookies are not available, a session can be tracked by adding a session identifier to the URL. 
  62.           To disable cookies, set sessionState cookieless="true".
  63.     -->
  64.     <sessionState 
  65.             mode="InProc"
  66.             stateConnectionString="tcpip=127.0.0.1:42424"
  67.             sqlConnectionString="data source=127.0.0.1;user id=sa;password="
  68.             cookieless="false" 
  69.             timeout="20" 
  70.     />
  71.  
  72.     <!--  GLOBALIZATION
  73.           This section sets the globalization settings of the application. 
  74.     -->
  75.     <globalization requestEncoding="utf-8" responseEncoding="utf-8" />
  76.    
  77.   </system.web>
  78.  
  79. </configuration>
  80.