创建站点时,我需要在所有新页面和默认主页中使用空白 Web 部件页面。
这是我到目前为止所拥有的
<WebFeatures>
<!-- SharePoint Server Publishing -->
<Feature ID="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb" >
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="DefaultPageLayout" value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx" />
</Properties>
</Feature>
<Modules>
<Module Name="DefaultBlank" Url="" Path="">
<File Url="default.aspx" NavBarHome="True" Type="Ghostable" >
<Property Key="PublishingPageLayout" value="~SiteCollection/_catalogs/masterpage/BlankWebPartPage.aspx, Blank Web Part Page" />
但我得到了这个例外
Microsoft.SharePoint.SPException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) ---> System.Runtime.InteropServices.COMException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) at Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate, Int32& plWebTemplateId) --- End of inner exception stack trace --- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate, Int32& plWebTemplateId) at Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors) at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors) at Microsoft.SharePoint.ApplicationPages.TemplatePickerUtil.ApplyWebTemplateAndRedirect(SPSiteAdministration siteAdministration, String strWebTemplate, String strRedirect, Boolean bCreateDefaultGroups, Page page, Boolean bDeleteOnError) Attempting to delete the site collection.