This intermittent error may show up in Event Viewer when your application fails to load: “The file has not been pre-compiled, and cannot be requested”. The intermittent nature of the issue makes it difficult to troubleshoot it but there are a couple of possible root causes and solutions.
The error message
Here is the full error message from Event Viewer (Event ID is 1309):
Event code: 3005 Event message: An unhandled exception has occurred.
Process information: Process ID: 2276 Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE
Exception information: Exception type: HttpException Exception message: The file ‘/ApplicationX/Login.aspx’ has not been pre-compiled, and cannot be requested. at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
In most cases, the root cause of the issue is that the application is not able to load one or more libraries. An assembly that web.config references is probably not available in the application directory or GAC.
The most common causes of this error:
There is a known bug in .NET Framework 4.7.x that causes this issue
Web.config file references an assembly that doesn’t exist in the application folder or GAC
An assembly file that exists in the application folder is not referenced by the web.config file