이 질문을하기에 적합한 곳이 되었길 바랍니다. sosial msdn을 사용해 보았지만 msdn 포럼이 죽은 것 같습니다. 마스터 페이지에 약간의 문제가 있습니다. 웹 템플리트 및 마스터 페이지를 만들었습니다. 새 사이트 모음을 만들고이 사이트 (http://win2008r2/sites/Test
)에 액세스하려고하면 "404 NOT FOUND"오류가 발생합니다. 내가 MasterPage 갤러리를 확인할 때SharePoint Foundation 2013 - Master Page 404 찾을 수 없음
그러나 : http://win2008r2/sites/Test/_catalogs/masterpage/Forms/AllItems.aspx
내 Demo.master을 찾을 수 있습니다. 사이트 모음 기능을 선택하면 마스터 페이지 기능이 활성화 된 것을 볼 수 있습니다. 내가 로그를 확인하고 이것은 내가 발견 한 유일한 것입니다 : 문서를 가져올 때 오류가 발생했습니다. 0x80070002가
나는 농장에 웹 템플릿 범위를 설정하고 난 사이트에 마스터 페이지 범위를 설정했습니다.
Google을 사용하여 문제를 해결하려고 시도했지만 다른 가이드를 사용해 보았지만 제대로 작동하지 못했습니다. 아무도 나를 도울 수 있습니까? 여기
는 Element.xml입니다 :이 문제를 해결하기 위해 내 코드의 자세한 내용을 보려면public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPWeb _web = ((SPSite)properties.Feature.Parent).RootWeb)
{
Uri _siteMaster = new Uri(string.Format("{0}/_catalogs/masterpage/Demo.master", _web.Url));
_web.MasterUrl = _siteMaster.AbsolutePath;
_web.CustomMasterUrl = _siteMaster.AbsolutePath;
_web.Update();
}
});
}
public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
{
SPSite curSite = (SPSite)properties.Feature.Parent;
SPWeb curWeb = curSite.RootWeb;
Uri masterUri = new Uri(curWeb.Url + "/_catalogs/masterpage/v4.master");
curWeb.MasterUrl = masterUri.AbsolutePath;
curWeb.CustomMasterUrl = masterUri.AbsolutePath;
curWeb.Update();
}
, 그래서 물어 주시기 바랍니다 : 여기에
<Module Name="MyMasterPage" List="116" Url="_catalogs/masterpage">
<File Path="MyMasterPage\Demo.master" Url="Demo.master" Type="GhostableInLibrary">
</File>
</Module>
이벤트 수신기 나는 더 많은 코드를 넣었다. ;)
ONet.xml 파일에 내 마스터 페이지를 추가합니다. SiteFeatures> –
user3172297
이 시점에서 더 이상 문제를 해결할 아이디어가 없습니다. 누군가가 적어도 뭔가를 알고 있다면 아무 것도없는 것보다 낫다. – user3172297
SPSite.RootWeb에서 SPWeb 개체를 삭제하지 마십시오. – trgraglia