Compilation Error: [No relevant source lines]

7

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:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_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:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v3.5\vbc.exe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\Windows\assembly\GAC_64\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll" /R:"C:\Windows\assembly\GAC_64\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_64\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\assembly\dl3\5a446507\0042bc76_16cec701\Intelligencia.UrlRewriter.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_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:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_SubCode_vb.8xqaf3z2.0.vb" "C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\edc6d145\6ccb6f45\App_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
c#
asp.net
iis
iis-7
iis-7.5
asked on Stack Overflow Aug 16, 2010 by HasanG • edited Aug 18, 2010 by HasanG

6 Answers

14
  1. Set True "Enable 32-bit Applications" for your default application pool if you are running on x64 machine.
  2. Grant Full Accesses for NETWORK SERVICE and IIS_IUSRS group on C:\Windows\Temp\ and C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\

Now it must work fine.

answered on Stack Overflow Aug 17, 2010 by HasanG • edited Jun 13, 2019 by HasanG
1

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]\AppData\Local\Temp\Temporary ASP.NET Files
C:\local\path\to\NET_App
C:\Windows\Temp
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary 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" />
answered on Stack Overflow Oct 21, 2015 by phillihp
0

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"
answered on Stack Overflow Sep 4, 2012 by Charlie • edited Sep 23, 2012 by Littm
0

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.

answered on Stack Overflow Dec 5, 2014 by Henry.K
0

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.

answered on Stack Overflow Oct 13, 2016 by nmit026
0

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)

answered on Stack Overflow Jul 20, 2018 by Khub Ram Bhardwaj

User contributions licensed under CC BY-SA 3.0