I am trying to enable VisitorIdentification on our pages, so I have added
@Html.Sitecore().VisitorIdentification() to our layout pages. However, when the page loads, it throws a 404 when trying to load VisistorIdentification.js found in /layouts/system/
The file exists, however when I try to browse to it directly, it also throws the file not found error page. If I put this file in the root /Scripts/ folder, it will load correctly.
The permissions are set so the site can access this folder, and it is using the layouts in the /layouts/ folder, as well as loading the VisitorIdentification.ascx in the /layouts/system folder, however it is not able to find the VisitorIdentification.js file.
This is the only thing that is found in the log file:
21492 12:09:40 ERROR Application error.
Message: Path '/layouts/system/VisitorIdentification.js' was not found.
at System.Web.HttpNotFoundHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)