IIS 7 Full Introduction to the page and control configuration

Source: Internet
Author: User
Tags command line commit config iis

Asp. NET Web page includes some additional elements that it can recognize and process at run time by ASP.net. Asp. NET pages can also contain reusable, custom controls. These custom controls will be processed by the server. This allows you to set asp.net Web page properties using server code.

IIS 7.0 allows you to configure the following ASP.net page and user control settings:

-Behavior setting: For example, when the current page request finishes, the page retains the view state of itself and all of the server controls it contains.

-General settings: For example, namespaces that are included in all pages.

-Compile settings: for example, compile or interpret a page.

-Services: For example, whether session state is enabled.

(i) Edit settings for pages and controls

IIS 7.0 is ASP. NET pages and controls provide the default settings, but we can change these settings as needed. For example, you can set up a site's master page file or enable view state.

1. Open IIS Manager, and then navigate to the level you want to manage.

2. In the feature view, double-click Pages and controls.

3. On the Pages and Controls page, edit the settings as needed.

4. When you are finished, click Apply in the Actions pane.

In addition, you can use the command line to hit the above purpose.

Command line

Enable or disable page output buffering

To enable or disable page output buffering, use the following syntax:

Appcmd Set config/commit:webroot/section:pages/buffer:true| False

Variable buffer:true is used to enable page output buffering. The default value is True.

Specify master Page files

To specify a master page file, use the following syntax:

Appcmd Set config/commit:webroot/section:pages/masterpagefile:string

The variable string is the name of the master page file.

Specify a style sheet theme

To specify a style sheet to apply to a page, use the following syntax:

Appcmd Set config/commit:webroot/section:pages/stylesheettheme:string

The variable string is the name of the style sheet.

Specify page Topics

To specify the subject name of a page that is used in the scope of the profile, use the following syntax:

Appcmd Set config/commit:webroot/section:pages/theme:string

The variable string is the name of the topic.

Enable or disable authenticated view state

To enable or disable the ability to perform a message validation check (MAC) on the page's view state when the page is postback from the client, use the following syntax:

Appcmd Set config/commit:webroot/section:pages/enableviewstatemac:true| False

Variable enableviewstatemac:true is used to enable Authenticated view state. The default value is True.

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.