Search code examples
.netiis-10

Unable to access web application after upgrading from .Net Framework 4.6 to .Net Framework 4.8


I have a web application was running on IIS 6.0 and was targeting .Net Framework 4.6.1. I have recently upgraded IIS to version to and I have installed .Net Framework 4.8 both on my development machine and my web server. I have confirmed that version 4.8 is running on the server by following the steps outlined here. I also made sure to change the Target Framework to 4.8 by going to the project property pages. After creating a new application in IIS 10 and moving the published files to the directory, I visit the application URL to find the following error:

BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.0.vb': System Error &Hc0000005& (Visual Basic internal compiler error)

c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe" /t:library /utf8output /R:"C:\windows\Microsoft.Net\assembly\GAC_64\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.IdentityModel\v4.0_4.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Web\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.Activities.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_64\System.Web\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\assembly\dl3\56a54d06\835fed79_c7a0d601\App_Web_the_application_page.aspx.cdcab7d2.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.WorkflowServices\v4.0_4.0.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ComponentModel.DataAnnotations\v4.0_4.0.0.0__31bf3856ad364e35\System.ComponentModel.DataAnnotations.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Data.DataSetExtensions\v4.0_4.0.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.CSharp\v4.0_4.0.0.0__b03f5f7f11d50a3a\Microsoft.CSharp.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Services\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.DynamicData\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.DynamicData.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.ApplicationServices\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.ApplicationServices.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activation\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activation.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel\v4.0_4.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml.Linq\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_64\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.ServiceModel.Activities\v4.0_4.0.0.0__31bf3856ad364e35\System.ServiceModel.Activities.dll" /R:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\assembly\dl3\4c4b96c5\b638438d_bca0d601\Interop.IWshRuntimeLibrary.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Entity\v4.0_4.0.0.0__b77a5c561934e089\System.Web.Entity.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Web.Extensions\v4.0_4.0.0.0__31bf3856ad364e35\System.Web.Extensions.dll" /R:"C:\windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /out:"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.dll" /D:DEBUG=1 /debug+ /nowarn:41008,40000,40008 /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 /warnaserror- /optionInfer+ "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.0.vb" "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.1.vb"

Microsoft (R) Visual Basic Compiler version 14.8.3761 for Visual Basic 2012 Copyright (c) Microsoft Corporation. All rights reserved.

This compiler is provided as part of the Microsoft (R) .NET Framework, but only supports language versions up to Visual Basic 2012, which is no longer the latest version. For compilers that support newer versions of the Visual Basic programming language, see http://go.microsoft.com/fwlink/?LinkID=533241

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.0.vb : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.0.vb': System Error &Hc0000005& (Visual Basic internal compiler error) C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.1.vb : error BC31007: Unable to open module file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\the_application\0d68bd1e\5c2220e1\App_Web_the_application_page.aspx.cdcab7d2.foubj9oz.1.vb': System Error &Hc0000005& (Visual Basic internal compiler error)

I have also made sure to Enable Directory Browsing for the application in IIS. Any help on this is greatly appreciated.

~Billy


Solution

  • Switching the identity of the application pool to the local system will raise the authority of the application pool to the highest level, which can solve the problem well.