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.
Here is the full error message from Event Viewer (Event ID is 1309):
Event code: 3005
Event message: An unhandled exception has occurred.
Application information:
Application domain: /LM/W3SVC/1/ROOT/ApplicationX-1-132102041647233704
Trust level: Full
Application Virtual Path: /ApplicationX
Application Path: E:\inetpub\wwwroot\ApplicationX\
Machine name: ServerX
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:
For the 2nd and 3rd causes, Turning on Assembly Binding Logging helps finding which assembly is causing this issue.
Other possible causes:
Publish options in Visual Studio
I won’t be able to provide solution for each of these causes but I am hoping that knowing these possible causes will help narrowing the issue down.
Here are a helpful ASP.NET forum topic and a MSDN blog post about this issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.