SharePoint site pages & Application pages

Source: Internet
Author: User

A very important concept of Sharepoint is site pages and application pages. SharePoint 2007 was used to access Sharepoint. If you have any misunderstandings, please kindly advise.

Site pages are pages that can be edited by using SharePoint designer. addition, deletion, and modification cannot be tracked in the physical file system, but in content dB.

Two important concepts of site pages:

    1. Ghosted or uncustomized page. The page is processed by the page template in the WFE file system.
    2. Unghosted or customized page. The page is customized and stored in the database.

Note:WFE is short for Web front end is Web Front End

 

Application pages is a file stored in a special location in the WFE file system.

Figure: the layouts directory is on the Web Front-end.

 

Speaking of site pages and application pages, Virtual File System in site has to understand

Virtual File System in SharePoint site.Virtual File System.

Figure:The page is customized and retrieved from the database. The page is not customized from WFEFile System.

 

Figure: ASP. NETObtain the virtual providerProvided information.

Note:The concept of virtual path provider started with. NET 2.0. The SharePoint Development Team implemented its own spvirtualpathprovider. (For details, see the http://bit.ly/cetGHN search spvirtualpathprovider keyword)

In short, the ing between file system and content dB is maintained by virtual path provider.

If the page is customized, the whole page will be stored in the database. When you access the custom page again, an additional page instance will be added, this is also the disadvantage of unghosted page, which affects performance.

If the page is not customized, all requests to the page are actually processed by templates stored in the WFE file system.

For example:When using blank template to create a site, it is easy to find a default in this site. ASPX page, which is actually created by the WFE physical file system template during the creation process. So we can see that all default. aspx content is the same. However, you can also edit and customize it. The default. aspx is actually the ghosted page, which is called the unghosted page. Once customized content is stored in the database.

Project scenario:When a site is deployed, sometimes pagelayout cannot be deployed or updated. After multiple checks, we find that pagelayout in WSP is indeed the latest version, the original files have been customized before the new files are deployed. When you access this page, Asp. net Runtime is the source of virtual path provider information or pointing to the database is not a file system.

In this case, after the new solution is deployed, the original page layout is sent to the reset to site definition through the SharePoint designer. alternatively, you can write a small tool to re-ghost the page. This operation allows the virtual path provider to know that the current page information is obtained from the page template in the WFE physical file system.

Tip:The spfile class has a customizedpagestatus attribute, which is based on spcustomizedpagestatus, including uncustomized, customized, and none. The status of sitepage in ghosted is uncustomized. After sitepage is customized, it becomes customized. Note that the value of none indicates that if the page is dynamically not dependent on the page template creation, the page status will be none at this time. ExampleCodeOr the page created by SPD.

Potential problems:Another important question is whether C # code can be added to sitepages?

The answer is no. To ensure the security of sitepages, Code cannot be added. If code can be added to operate the database, the entire farm is not just the current application.Program.

Therefore, sitepages runs in safe mode, so the control referenced by the page must be in the web. register as safecontrol in config. in this way, the functions can be further separated. The website set administrator can change sitepages. However, to deploy a control on the site, the farm administrator must know that such a control should be deployed to the Web. config. The permission of the farm administrator is high, but sitecollection admin cannot be deployed.

Turning Point:The sandboxed solution http://bit.ly/a0Qxzi is recommended for Sharepoint 2010, so that sitecollection admin can deploy sandboxed solution.

There is also the arrival http://bit.ly/azq882 of sandboxed Visual Web part. Further analysis is required in the following sections.Sp2010 OOTB Project.

 

The above is the description of sitepage, for application page.

    1. The application page can be deployed by the Inline code, which is a special folder on the front-end of the WFE file system.
    2. The application page can be accessed through site/_ layouts or site/subsite/_ layouts/and only exists in the file system of the Web Front-end.
    3. Application page has good performance because it does not involve page storage in the database.
    4. Unfortunately, many apps share this layout Directory, which is not flexible enough.

Of course, application page can only be deployed through farm solution.

 

Best practices:When deploying the product environment, use ghosted site page instead of application page to avoid using Spd customization in the prod environment.

 

Now, let's write it here. See the following chapters.

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.