문제

잘 언급 된 대로이 용어의 정의를 알고 있습니다 :

고스트 됨 페이지 : 파일 시스템에있는 페이지가 있고 콘텐츠 DB가 아닌 페이지입니다.

unghosted pages : 콘텐츠 db에있는 페이지

응용 프로그램 페이지 : 파일 시스템에 저장된 일반 ASP.NET 페이지.

사이트 페이지 : db에 저장된 일반 내용 페이지

이러한 정의에 따르면 사이트 페이지는 항상 유용하지 않아야하며 응용 프로그램 페이지는 항상 고스트해야합니다.

이제는 문제가 있습니다. SP Virtual Path Provider : Ghosted 및 Usghosted 사이트 페이지 모두에 대한 가상 경로를 제공합니다.사이트 페이지가 어떻게 고스트 될 수 있습니까? 이 MSDN 링크 또한 현장 페이지의 유령과 무가시 팅에 대해 이야기합니다.

몇 가지가 나에게 이러한 것들을 설명 할 수 있습니까?

도움이 되었습니까?

해결책

The Ghosting/Un-Ghosting (or if you prefer the new Term Customized/Un-Customized) makes a real difference when you consider _layouts page, wcf services, etc. in the context of the SP Virtual Path provider (which then loads the Page Parser)

Example -

A Document Workspace has a default.aspx (physical) where as Team Site in SP 2010 has a Wiki Page (database). Therefore Site Pages can also be physical, until you customize any of them - via SPD.

I found the best explanations here http://msdn.microsoft.com/en-us/library/bb892189(v=office.12).aspx#WSS3Inside_Integration and http://sharepointjha.wordpress.com/2011/05/16/virtual-path-provider-in-sharepoint/ and http://sharepoint.infoyen.com/2012/03/21/site-pages-vs-application-pages/

다른 팁

Application Pages: Always ghosted

Site Pages: Ghosted and Unghosted

When site pages ghosted?

LayoutsPageBase is good example. When any page created using this base class (also called layout pages or template pages) and if it is deployed to _layout path or any other path, it has physical presence on file system (c:\program files\common files\microsoft shared\web server extensions\xx\TEMPLATE\LAYOUTS). Then VPP creates instance of page and caches it in database.

When site pages unghosted?

When VPP loads page layouts from content database (instance of page).

What VPP (Virtual Path Provider) does?

VPP does both jobs (Ghosted and Unghosted) for single request of page. First it reads template page (ghosting), second it reads instance of page (unghosting), and then combines both parties and render the page.

Example:

I have a news organization. I have created custom page layout to list down all my news. In my company, the news publisher has responsibility to generate news list page.

mycompanyListPage ----> Provisioned ----> mycompanyListPageA, mycompanyListPageB, mycompanyListPageC

Here, mycompanyListPage is PageLayout and appended A,B,C are page instances created by news publisher using mycompanyListPage template.

I use Module elements to place the template page to particular path and File element to provision instance pages. One more confusing component made MS guys is GhostableInLibrary

<File Url="mycompanyListPage.aspx" Name="mycompanyListPageA.aspx" Type="GhostableInLibrary" />

If you want to provision a page inside a document library then use above line.

<File Url="mycompanyListPage.aspx" Name="mycompanyListPageA.aspx" Type="Ghostable" />

If you want to provision a page from file system (physical path) then use above line. Its like GhostableInFileSystem.

In both the cases mycompanyListPage.aspx is ghostable and mycompanyListPageA.aspx is unghostable.

Take a look at this video on building custom SharePoint Site Pages. In it I explain customized/un-customized (ghosted/un-ghosted). Since Application Pages are not put into the content database they are never ghosted.

The Inside Microsoft Windows SharePoint Services 3.0 is another good source for discussion of Site and Application Pages

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top