Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3940462
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:25:18+00:00 2026-05-20T00:25:18+00:00

I need to add javascript for my masterpage. In package i added folder Layouts\ProjectName\custominit.JS

  • 0

I need to add javascript for my masterpage.
In package i added folder Layouts\ProjectName\custominit.JS
Then i add ScriptLink to my masterpage:

But have a problem, becouse script is visible only on subsites:

http://localhost/subsite/

The top level site generate error
“File not found”!

    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 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T00:25:18+00:00Added an answer on May 20, 2026 at 12:25 am

    This will be because you need to apply that masterpage which you customised to all sites (do it from Site collection level then make all subsites inherit).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the need to add a javascript include to my ASP.NET page. The
I need to add a specific column if it does not exist. I have
Hi I have a usercontrol which includes some JavaScript, if I add the control
In javascript or jquery I need to add an alert when the user clicks
I have a series of horizontal div boxes that I need to add the
I have a list of 8 divs and need to add a sequence of
I have the id of my element. I need to add a given value
I am building a javascript widget and i need to add my widget css
I need to add a web part zone to a wiki page. I'm opening
I need to add DVD writing functionality to an application I'm working on. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.