3. ASP. NET page analysis

Source: Internet
Author: User

1. Cause ASP. NET Applications Program Cause of Restart
1. achieve the maximum size of dynamic page compilation. This limit can be configured in the web. config file.
2. the physical path of the Web application is changed, or any directory is renamed.
3. Files in the global. asax, Machine. config, Web. onfig, or bin directory (including its subdirectories) under the root directory of the application are changed.
4, Code Security Access policy file changed (if the file exists)
5. Too many files in a content directory have been changed (if these files are generated in real time upon request, this usually happens)
6. the restart/Close settings used to control ASP. NET worker threads are changed. If you do not use the IIS 203 process mode of Windows Server 6.0, these settings are obtained from machine. config. If IIS 6.0 is fully used, the corresponding program will be restarted when the [application pool] node of the IIS manager is changed.
2. Instructions for page processing
@ Assembly: Used to link an assembly to the current page or user control.
@ Control: defines attributes unique to controls the behavior of the control compiler.
@ Implements: used to indicate that the current page or the current user control implements the specified. NET Framework interface.
@ Import: used to import a namespace to a page or user control.
@ Master: identifies the current page as an ASP. NET template page. ASP. NET 1.x does not support this command
@ Mastertype: When you access the ASP. net template page through the master property, it provides a method to create a strong type reference for this template page. ASP. NET 1.x does not support this command
@ Outputcache: used to control the output cache policies of pages or user controls
@ Page: defines the unique properties of a page to control the actions of the page editor and language parser on the page.
@ Previouspagetype: provides a method to obtain the strong reference type of the previous page. You can access the previous page through the previouspage attribute.
@ Reference: Used to link a page or user control to the current page or user control.
@ Register: used to create custom tags on a page or control. The new tag (including the prefix and name) associates the naming control with the custom control.
3. @ page command
It can only be used on the. ASPX page and can contain up to one
The @ page command attribute used for page Compilation:
Classname: Specifies the name of the dynamically generated class when the page is dynamically requested. It must be a class name without namespace information.
Codefile: indicates the path of the hidden class of the current page code. This type of file must be deployed on the Web server. ASP. NET 1.x does not support this attribute
Codebehind: the attribute used by Visual Studio. NET 2003 to indicate the path of the hidden class of the current page code. This type of file will be compiled into a deployable assembly (codefile attribute should be used for ASP. Net of Version 2.0 or later)
Codefilebaseclass: Specifies the base class name of the page and its associated hidden code class. This attribute is optional, but must be specified if the codefile attribute is used. ASP. NET 1. X does not support this attribute.
Compilationmode: indicates whether the current page is compiled at runtime. ASP. NET 1.x does not support this attribute
Compileroptions: used to compile a series of compiler command line parameters on the current page
Debug: A boolean value used to indicate whether to compile the item using the debug symbol.
Explicit: A boolean value used to determine whether to set the option explicit mode of Visual Basic to on when compiling the page. Option explicit forces the programmer to explicitly declare all variables. If the language selected on the current page is not Visual Basic. net, this attribute is ignored.
Inherits: defines the base class to be inherited from the current page. It can be any class derived from the page class.
Language: The language used to prompt the Inline code block (<%... %>) and the code in the <SCRIPT> section during compilation. Supported languages include Visual Basic. net, C #, JScript. net, and J #. If not specified, use the default settings Visual Basic. net
Linepragmas: used to specify whether the runtime should be Source code Line Pragma)
Masterpagefile: used to specify the template page of the current page. ASP. NET 1.x does not support this attribute
SRC: indicates the path of the source file that contains the base class specified by the implementation of inherits. This attribute is not applicable to Visual Studio and other Rapid Application Development designer (RAD ).
Strict: A boolean value used to determine whether to set the option strict of Visual Basic to on when compiling the current page. If option strict is enabled, only type-safe conversions are allowed. Invisible conversions that may cause data loss are prohibited (in this case, the behavior is the same as that of C ), if the language selected on the current page is not Visual Basic.. net. This property is ignored.
Trace: A boolean value used to indicate whether the tracking function is enabled. If the tracking function is enabled, additional information is appended to the output of the page. The default value is false.
Tracemode: When the tracking function is enabled, a message tracing method is displayed on the current page. Valid values: sortbytime and sortbycategory. The default value is sortbytime.
WarningLevel: indicates the warning level of the compiler. When the value reaches the specified level, the compilation process is terminated. The valid value is 0 ~ 4
The @ page command attribute used for page behavior:
Aspcompat: Specifies a Boolean attribute. If it is set to true, the current page can be executed on a single-thread unit (STA) thread, this setting enables the page to call COM + 1.0 components and components that need to access unmanaged ASP built-in objects developed with Visual Basic 6.0
Async: if it is set to true, the generated page class will be derived from ihttpasynchandler, instead of enabling ihttphandler to add some built-in non-synchronous functions to the page. ASP. NET 1.x does not support this attribute
Asynctimeout: defines the timeout time (in seconds) used to process asynchronous tasks. The default value is 45 seconds. ASP. NET 1.x does not support this attribute
Autoeventwireup: A boolean attribute used to indicate whether to enable page events. The default value is true. Web pages developed using Visual Studio. NET will set this attribute to false, and page events will be bound to the handler respectively.
Buffer: Boolean attribute used to determine whether HTTP Response buffering is enabled. The default value is true.
Description: provides the text description of the current page. The ASP. NET parser ignores this attribute and only uses Composition Document Description
Enableeventvalidation: A boolean attribute used to determine whether to generate an implicit field on the current page. this parameter is used to buffer input fields that support event data verification. The default value is true. ASP. NET 1.x does not support this attribute
Enablesessionstate: used to define how the current page processes session data. If this parameter is set to true, you can read/write the session status. If set to false, the application cannot use session data. If it is set to readonly, the session data can only be read, but cannot be changed.
Enableviewstate: Boolean attribute used to indicate whether to maintain the view status for page requests. View status is the context of the page call and is used to save the set of current Page Status values during the round-trip process.
Enabletheming is a Boolean attribute used to indicate whether the current page applies the topic to the embedded control. The default value is true. ASP. NET 1. X does not support this attribute.
Enableviewstatemac: A boolean attribute used to indicate whether ASP. Net generates an authentication code for a specific computer and append it to the view State of the page (except base64 encoding ). Mac in the property name represents "Computer authentication check ". If this attribute is set to true, ASP. NET checks the authentication code of the view status when sending a response to ensure that it is not tampered with on the client.
Errorpage: defines a target URL, which points to a prompt page. When an unhandled exception occurs on the page, the user is redirected to this location.
Maintains into rollpositiono your PostBack: Used to indicate whether to restore the position of the client browser's scroll bar after sending back. The default value is false.
Smartnavigation: A boolean attribute that indicates whether the current page supports smart navigation for Internet Explorer 5 or later. Smart navigation makes the page refresh without losing its location and element focus
Theme, stylesheettheme: used to indicate the selected topic (or style sheet topic) for the current page ). ASP. NET 1.x does not support this attribute
Transaction: indicates whether the current page supports or requires transactions. Valid values: Disabled, notsupported, supported, required, and requiresnew. By default, transaction support is disabled.
Validaterequest: A boolean attribute used to indicate whether request verification is performed. If set to true, ASP. NET checks all input data based on a list of hard-coded potential dangerous values. This feature helps reduce the risk of cross-site scripting attacks on pages. The default value is true. ASP. NET 1.x does not support this attribute
Viewstateencryptionmode: used to indicate the view encryption mode. There are three possible values: auto, always, and never. The default value is auto, and the view State is encrypted only when the control is required. Note that the view data is encrypted for each page Processing request, causing additional overhead on the server.
The @ page command attribute used to control the output:
Clienttarget: indicates the browser to be oriented when the ASP. NET Server Control presents its content
CodePage: used to indicate the value of the corresponding code page. This attribute is set only when a page is created using a code page (instead of the default code page of the web server that runs the page. In this case, set the property to the code page of the development computer. A code page is a collection of symbols, including numbers, punctuation marks, and other symbols. The code pages in different languages are different.
Contenttype: defines the response content type as the standard MIME type. Supports any valid HTTP Content string
Culture: indicates the culture settings of the current page. Regional information includes the writing and sorting system, calendar, and currency format. The property value must be a regional name, that is, it must contain language and country information. For example. En-us is a valid value, and how can en itself be considered irrelevant to the country?
Lcid: A 32-bit value used to define the area identifier of the page. By default, ASP. NET uses the web server's region settings.
Responseencoding: indicates the encoding scheme name of the current page. This value is used to set the charset attribute of the HTTP header of the content type. Internally, ASP. NET processes all strings according to Unicode
Title: indicates the title of the current page. This is not useful for general pages, because HTML <title> labels can be used, this attribute is defined to help developers set titles for content pages that cannot access <title> (depending on the Structure Design of the template page ).
Uiculture: Specifies the default region information name used by the Resource Manager (Response manager) to find resources in a specific region at runtime.
4. @ Assembly command

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.