Compilation Error: [No relevant source lines]

I’m getting this error when trying to view a page in my localhost. Web site worked before. The code files are not pre-compiled. I’ve cleaned asp.net temporary folders and gave full control permission to IIS_IUSRS account for wwwroot and Temporary ASP.NET Files folder but no change.

I also get Access Denied error while try to execute

C:WindowsMicrosoft.NETFramework64v2.0.50727aspnet_regiis.exe -i

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC2000: compiler initialization failed unexpectedly: 0x80070005

Source Error: [No relevant source lines]

Source File: vbc : Fatal Line: 0

Detailed Compiler Output:

c:windowssystem32inetsrv> "C:WindowsMicrosoft.NETFramework64v3.5vbc.exe" /t:library /utf8output /R:"C:WindowsassemblyGAC_MSILSystem.ServiceModel.Web3.5.0.0__31bf3856ad364e35System.ServiceModel.Web.dll" /R:"C:WindowsassemblyGAC_MSILSystem.WorkflowServices3.5.0.0__31bf3856ad364e35System.WorkflowServices.dll" /R:"C:WindowsassemblyGAC_64System.Data2.0.0.0__b77a5c561934e089System.Data.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Runtime.Serialization3.0.0.0__b77a5c561934e089System.Runtime.Serialization.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Design2.0.0.0__b03f5f7f11d50a3aSystem.Design.dll" /R:"C:WindowsassemblyGAC_64System.Web2.0.0.0__b03f5f7f11d50a3aSystem.Web.dll" /R:"C:WindowsassemblyGAC_64System.EnterpriseServices2.0.0.0__b03f5f7f11d50a3aSystem.EnterpriseServices.dll" /R:"C:WindowsassemblyGAC_MSILSystem.IdentityModel3.0.0.0__b77a5c561934e089System.IdentityModel.dll" /R:"C:WindowsassemblyGAC_MSILSystem2.0.0.0__b77a5c561934e089System.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Drawing2.0.0.0__b03f5f7f11d50a3aSystem.Drawing.dll" /R:"C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Files
ootedc6d1456ccb6f45assemblydl35a446507 042bc76_16cec701Intelligencia.UrlRewriter.DLL" /R:"C:WindowsassemblyGAC_MSILSystem.Core3.5.0.0__b77a5c561934e089System.Core.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Xml2.0.0.0__b77a5c561934e089System.Xml.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Configuration2.0.0.0__b03f5f7f11d50a3aSystem.Configuration.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Web.Services2.0.0.0__b03f5f7f11d50a3aSystem.Web.Services.dll" /R:"C:WindowsassemblyGAC_MSILSystem.Web.Mobile2.0.0.0__b03f5f7f11d50a3aSystem.Web.Mobile.dll" /R:"C:WindowsassemblyGAC_MSILSystem.ServiceModel3.0.0.0__b77a5c561934e089System.ServiceModel.dll" /out:"C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Files
ootedc6d1456ccb6f45App_SubCode_vb.8xqaf3z2.dll" /D:DEBUG=1 /debug+ /define:_MYTYPE="Web"" /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Specialized,System.Configuration,System.Text,System.Text.RegularExpressions,System.Web,System.Web.Caching,System.Web.SessionState,System.Web.Security,System.Web.Profile,System.Web.UI,System.Web.UI.WebControls,System.Web.UI.WebControls.WebParts,System.Web.UI.HtmlControls,System.Web.Configuration,System.Data,System.Data.OleDb,System.Globalization /warnaserror- /optionInfer+  "C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Files
ootedc6d1456ccb6f45App_SubCode_vb.8xqaf3z2.0.vb" "C:WindowsMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Files
ootedc6d1456ccb6f45App_SubCode_vb.8xqaf3z2.1.vb"

Microsoft (R) Visual Basic Compiler version 9.0.30729.715
Copyright (c) Microsoft Corporation.  All rights reserved.

vbc : Fatal error BC2000 : compiler initialization failed unexpectedly: 0x80070005
Enquirer: HasanG

||

Solution #1:

First, try setting “Enable 32-bit Applications” to True for your website application pool if you are running on x64 machine.

If first option doesn’t help, Grant Full Accesses for NETWORK SERVICE and IIS_IUSRS group on C:WindowsTemp and C:WindowsMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files

Respondent: HasanG

Solution #2:

This happened to me after repairing / upgrading my VS 2013 Express

I first tried adding “IIS_IUSRS” and “NETWORK SERVICE” with Modify to the following:

C:Users[username]AppDataLocalTempTemporary ASP.NET Files
C:localpath	oNET_App
C:WindowsTemp
C:WindowsMicrosoft.NETFrameworkv4.0.30319Temporary ASP.NET Files
C:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files

Those did not work. But then I removed the optimizeCompilations=”true” from the compilation tag under system.web and everything worked great.

<compilation debug="true" targetFramework="4.5.1" batch="false" optimizeCompilations="false" />
Respondent: HasanG

Solution #3:

I got the same error when i add .ascx and use it in .aspx, but src path was wrong, add:

tagPrefix="uc" src="~/Signup**d**/UserControls/CreditCheck.ascx" tagName="CreditCheck"
Respondent: phillihp

Solution #4:

My solution was to Grant Full Accesses for NETWORK SERVICE user and Modify Rights for the IIS_IUSERS to your ASP.NET root application folder.

The issue was caused by web.config transformation. It needs to create a temp file in the root application folder.

Respondent: Charlie

Solution #5:

The line zero behaviour is generally caused by compiling with optimizations turned on (eg inlining). Try unchecking “Optimize code” under your project’s Properties – Build tab. Then Source Error will show the offending code with line numbers.

Respondent: Henry.K

Solution #6:

I faced same issue.

My Symptom: it was working find on local but was failing on dev/stage.
Reason I found: There was an appvariable used in aspx.cs (as following) which was missing in web.config

public static String myKey = ConfigurationManager.AppSettings[“myKey”].ToString();

Reason it took long for me to figure out issue was, i was not expecting this type of error message on line 0 (may be because my developer defined this variable as static so it was throwing line 0 error)

Respondent: nmit026

The answers/resolutions are collected from stackoverflow, are licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0 .

Leave a Reply

Your email address will not be published.