Webconfig configuration file Detailed

Source: Internet
Author: User
Tags configuration settings error status code connectionstrings

<?xml version= "1.0"?><!--Note: In addition to manually editing this file, you can also use the WEB management tool to configure settings for your application. You can use the ASP. NET configuration option in Visual Studio. A complete list of settings and comments in Machine.config.comments, the file is typically located in the Windows microsoft.net Framework v2.x config. -<!--The Webconfig file is an XML file, the configuration is the root node of the XML file, and since the root node of the XML file can only have one, all configurations of the webconfig are made within this node. --><configuration> <!--Specify configuration sections and namespace declarations. Clear: Removes all references to inherited sections and section groups, allowing only the sections and section groups that are added by the current section and sectiongroup elements. Remove: Removes references to inherited sections and section groups. Section: Defines the association between configuration sections handlers and configuration elements. Sectiongroup: Defines the association between a configuration section handler and a configuration section. -<configSections> <sectiongroup name= "system.web.extensions" type= " System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, version=1.0.61025.0, culture= Neutral, publickeytoken=31bf3856ad364e35 "> <sectiongroup name=" scripting "type=" System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, version=1.0.61025.0, Culture=neutral, Publickeytoken=31bf3856ad364e35 "> <section name=" scriptResourceHandler "type=" SystEm. Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, version=1.0.61025.0, culture=      Neutral, publickeytoken=31bf3856ad364e35 "requirepermission=" false "allowdefinition=" MachineToApplication "/> </sectionGroup> </sectionGroup> <section name= "Rewriter" type= " Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.urlrewriter "/> </configSections> <!--appSettings is an application setting that defines information such as global constant settings for an application--<appSettings> <add key= "1" value= "1"/> <add key= "Gao" value= "Weipeng"/> </appSettings> <!--connection string set--< connectionstrings> <add name= "connstring" connectionstring= "Data source=gao;initial Catalog=HBWXDate;  User id=sa;password=sa "></add> <add name=" 111 "connectionstring=" 11111 "/> </connectionStrings> <!--Specify the resources that apply the child configuration settings and lock the configuration settings to prevent them from being overridden by the quilt profile. The page specifies the resource that the application contains configuration settings for. allowoverride allow configuration file overrides to improve configuration file security-<location path= "DefauLt.aspx "allowoverride=" false "> <!--Control the behavior of the ASP.--><system.web> <!-- The identity control authentication identity of the Web application .--> <identity impersonate= "false"/> <!--identify page-specific configuration settings, such as whether session state is enabled, view state, whether the user's output is detected etc.).    <pages> can be declared at the machine, site, application, and subdirectory levels. Several of the properties here mean that the default home page is index, and the subject is defaults, and does not detect the presence of potentially dangerous data in the browser input (note: The item is detected by default, if you use no detection, one to encode or verify the user's input), When the page is posted back from the client, the encrypted view state is checked to verify that the view state has been tampered with on the client. (Note: The item is not validated by default) disable viewstate--> <pages masterpagefile= "Index" theme= "Default" Buffer= "true" enableviewstatemac= "      True "validaterequest=" false "Enableviewstate=" false "> <!--controls element defines a collection of register directives and namespaces where tag prefixes are located-- <controls></controls> <!--collection of import directives that will be used during assembly precompilation--<namespaces></namespaces> &lt ;/pages> <!--default error page settings, mode: With On,off,remoteonly 3 states. On means that custom information is always displayed; Off means that detailed ASP. NET error information is always displayed; RemoteOnly indicates that custom information is only displayed for users who are not running on the local Web server. Defaultredirect: URL to redirect when error occurs--<customerrors defaultredirect= " Err.html "Mode=" RemoteOnly"> <!--Special code number error from directed file--<error statuscode=" 403 "redirect=" noaccess.htm "/> <error status Code= "404" redirect= "filenotfound.htm"/> </customErrors> <!--configuration Debug and trace: The following configuration means start debugging (default), capture trace information, and trace to cache Number (15), trace the order of the results--<trace enabled= "true" localonly= "false" pageoutput= "true" requestlimit= "tracemode=" SortByCategory "/> <!--settings compilation debug=" True "inserts the debug symbol into the compiled page. However, because this affects performance, this value is set to true only during development. Set the default development language C #. Does batch support batching--<compilation debug= "true" defaultlanguage= "C #" batch= "false" > <assemblies> & lt;! --Adding an assembly reference, each add an assembly, means that your application has relied on an assembly, and you can use the <add assembly= "System.Web.Extensions in your application, version= 1.0.61025.0, culture=neutral, publickeytoken=31bf3856ad364e35 "/> <add assembly=" System.Design, Version=2.0.0. 0, Culture=neutral, publickeytoken=b03f5f7f11d50a3a "/> <add assembly=" System.Web.Extensions.Design, Version=1 .0.61025.0, Culture=neutral, PuBlickeytoken=31bf3856ad364e35 "/> <add assembly=" System.Windows.Forms, version=2.0.0.0, Culture=neutral, Publi ckeytoken=b77a5c561934e089 "/> <add assembly=" system.web, version=2.0.0.0, Culture=neutral, PublicKeyToken=B03 f5f7f11d50a3a "/> <add assembly=" System, version=2.0.0.0, Culture=neutral, publickeytoken=b77a5c561934e089 "/&G        T <add assembly= "System.Xml, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089"/> <add Assem Bly= "System.Drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a"/> <add assembly= "Syst Em. Data, version=2.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089 "/> <add assembly=" System.Web.Services , version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a "/> <add assembly=" System.Configuration, V ersion=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a "/> </assemblies> <!--define a file for compiling custom resource files A collection of build providers. -<buildProviders> <!----> <add extension= ". aspx" Type= "System.Web.Compilation.PageB Uildprovider "/> <add extension=". ascx "type=" System.Web.Compilation.UserControlBuildProvider "/> &lt Add extension= ". Master" type= "System.Web.Compilation.MasterPageBuildProvider"/> <add extension= ". asmx" type= "System.Web.Compilation.WebServiceBuildProvider"/> <add extension= ". ashx" Type= " System.Web.Compilation.WebHandlerBuildProvider "/> <add extension=". Soap "Type=" System.Web.Compilation.WebServiceBuildProvider "/> <add extension=". resx "Type=" System.Web.Compilation.ResXBuildProvider "/> <add extension=". Resources "Type=" System.Web.Compilation.ResourcesBuildProvider "/> <add extension=". wsdl "type=" System.Web.Compilation.WsdlBuildProvider "/> <add extension=". xsd "type=" System.Web.Compilation.XsdBuildProvider "/> <add extension=". rdlc "Type=" MicroSoft. Reporting.rdlbuildprovider, Microsoft.ReportViewer.Common, version=8.0.0.0, Culture=neutral, publickeytoken=  b03f5f7f11d50a3a "/> </buildProviders> </compilation> <!--through <authentication> sections can be configured The Secure authentication mode that ASP. NET uses to identify the incoming user. Windows: Using IIS Authentication method, forms: Using Forms-based authentication, Passport: Passport cookie Authentication mode, none: No authentication Method-<authentication mode= " Forms > <!--name: Specifies the names of the HTTP cookies that complete the authentication. Loginurl: If the page URL is not redirected after validation or timeout, it is usually the login page that lets the user log in again.       Protection: Specifies how the cookie data is protected. Can be set to: all means encrypted data, and validation two ways, none means that does not protect cookie,encryption means to encrypt the cookie content, validation means to validate the cookie content, TimeOut: Specifies the expiration time of the cookie. To log back in after a timeout. --<forms name= ". Aspxuserdemo "loginurl=" Login.aspx "protection=" All "timeout=" "/> </authentication> <!--control clients for URL resources Access (such as allowing anonymous users access). This element can be declared at any level (computer, site, application, subdirectory, or page). Must be used in conjunction with the <authentication> section. The meaning here is that anonymous users are not authenticated. Deny user weipeng--> <authorization> <allow users= "*"/> <deny users= "WeiPeng "/> <allow users=" AA "roles=" AA "/> </authorization> <!--site globalization settings, requestencoding: It is used to check each The encoding that is sent to the request. ResponseEncoding: Used to check the response content encoding sent back. fileencoding: The default encoding for checking for file resolution such as ASPX,ASAX, the default encoding is Utf-8--> < Globalization requestencoding= "gb2312" responseencoding= "gb2312" fileencoding= "gb2312"/> <!--session state settings. Mode: Divided into off,inproc,stateserver,sqlserver several states mode = Inproc stored in Process features: Best performance, fastest, but cannot store shares across multiple servers. mode = "StateServer" stored in the State Server feature: Use this method when you need to maintain user session information across servers. However, the information is stored on the state server and the information is lost once the state server fails. mode= "SQL Server" is stored in SQL Servers: workloads are larger, but information is not lost stateConnectionString: Specifies the server name of the ASP. NET application store remote session state, which defaults to native. sqlConnectionString: The connection string is set here when the session state database is used. Cookieless: When set to Flase, a cookie session state is used to identify the customer. Timeout indicates the session time-out. --<sessionstate mode= "InProc" stateconnectionstring= "tcpip=127.0.0.1:42424" sqlconnectionstring= "data source=127.0.0.1; Trusted_connection=yes "cookieless=" false "timeout=" ></sessionState> <!--the view state setting for the ASP. NET application Configuration page. Sets the number of items to be stored in the page history. --&Lt;sessionpagestate historysize= "9"/> <!--Configure the settings for the ASP. NET HTTP runtime. The maximum number of requests that can be declared at the computer, site, application, and subdirectory levels is 100, the maximum allowable execution time is 80 seconds, and the size of the user's uploaded file is controlled by default of 4M. useFullyQualifiedRedirectUrl client redirection does not need to be automatically converted to fully qualified format. --

  

Article Source: http://www.cnblogs.com/gaoweipeng/archive/2009/05/17/1458762.html

Webconfig configuration file Detailed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.