2011-02-11 3 views
1

내 masterpage에 javascript를 추가해야합니다. 스크립트를 볼 수 렸기 때문에 단지 하위 사이트에 Sharepoint에는 모든 사이트 수준의 자바 스크립트가 포함되어 있습니다. SharePoint : ScriptLink

그러나 문제가있다 : 패키지에서 은 내가 그럼 난 내 masterpage에 ScriptLink를 추가 할 폴더 레이아웃 \ 프로젝트 이름 \ custominit.JS을 추가

http://localhost/subsite/

최상위 사이트 오류가 발생했습니다 "파일을 찾을 수 없습니다"!

Unexpected System.IO.FileNotFoundException: The file/does not exist. at Microsoft.SharePoint.ApplicationRuntime.SPRequestModuleData.GetWebPartPageData(HttpContext context, String path, Boolean throwIfFileNotFound)  at Microsoft.SharePoint.ApplicationRuntime.SPVirtualFile.CalculateFileDependencies(HttpContext context, SPRequestModuleData basicRequestData, ICollection& directDependencies, ICollection& childDependencies)  at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.EnsureDependencies(HttpContext context, SPRequestModuleData requestData)  at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.EnsureCacheKeyAndViewStateHash(HttpContext context, SPRequestModuleData requestData)  at Microsoft.SharePoint.ApplicationRuntime.SPDatabaseFile.GetVirtualPathProviderCacheKey(HttpCo... 058b0aff-0b84-4fb9-a86d-07a77a3ebada 
02/11/2011 14:17:39.00* w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Runtime       tkau Unexpected ...ntext context, SPRequestModuleData requestData)  at Microsoft.SharePoint.ApplicationRuntime.SPVirtualPathProvider.GetCacheKey(String virtualPath)  at Microsoft.SharePoint.Publishing.Internal.CmsVirtualPathProvider.GetCacheKey(String virtualPath)  at System.Web.Compilation.BuildManager.GetCacheKeyFromVirtualPath(VirtualPath virtualPath, Boolean& keyFromVPP)  at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)  at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile)  at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(... 058b0aff-0b84-4fb9-a86d-07a77a3ebada 
02/11/2011 14:17:39.00* w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Runtime       tkau Unexpected ...VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean noAssert)  at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert)  at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)  at System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 058b0aff-0b84-4fb9-a86d-07a77a3ebada 
02/11/2011 14:17:39.00 w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Monitoring      b4ly Medium  Leaving Monitored Scope (Request (GET:http://localhost:80/SitePages/Home.aspx)). Execution Time=13.2701223200155 058b0aff-0b84-4fb9-a86d-07a77a3ebada 
02/11/2011 14:17:40.49 w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Monitoring      nasq Medium  Entering monitored scope (Request (GET:http://localhost:80/_layouts/help.aspx?Lcid=1033&Key=WSSEndUser_troubleshooting&ShowNav=true))  
02/11/2011 14:17:40.49 w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Logging Correlation Data  xmnv Medium  Name=Request (GET:http://localhost:80/_layouts/help.aspx?Lcid=1033&Key=WSSEndUser_troubleshooting&ShowNav=true) 842cff7a-417a-49ef-8c54-d795bc5f5ccf 
02/11/2011 14:17:40.51 w3wp.exe (0x1A68)       0x1290 SharePoint Foundation   Logging Correlation Data  xmnv Medium  Site=/ 842cff7a-417a-49ef-8c54-d795bc5f5ccf 

답변

1

당신은 당신이 모든 사이트 (모든 하위 사이트가 상속 할 사이트 모음 수준에서 그것을 할)에 정의 그 masterpage을 적용해야하기 때문에이 될 것입니다.

+0

사용자 지정 마스터 페이지가있는 모든 하위 항목. On 하위 사이트 스크립트가 실행 중입니다. 하지만 메인 레벨에서 "File not found"가 표시됩니다. 문제없이 Javascript를 실행하지 않고 Masterpage하기 – Evgeny

1

Free SharePoint Infuser과 같은 것을 사용하여 사이트 모음의 모든 페이지에 JavaScript를 자동으로 삽입 해 보았습니까?

관련 문제