Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

M-Files Web Access stops working after upgrade to 22.9 or later due to .NET issues

Last updated on 26 September 2022

Admin
M-Files Admin

Overview

After upgrading M-Files, you have the following error message when trying to browse into M-Files Web Access:

image.png

Also following error can be seen from Event Viever:

Event code: 3008 

Event message: A configuration error has occurred. 

Exception information: 

    Exception type: ConfigurationErrorsException

    Exception message: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.

This error is likely to manifest when upgrading to a 22.9 or later version from a 22.8 or earlier version.

Solution

Installing .NET Framework 4.7.2 / 4.8.x fixes this issue. If IIS is on a separate server, verify you have the .NET installed in both servers. Download .NET Framework | Free official downloads (microsoft.com) 

If you already have the correct .NET installed, you should repair the installation and restart your system.

Details

Below is the full error stack you can see in the Windows Event Log, coming from the ASP.NET 4.0 source.

M-Files has required .NET 4.7.2 for quite some time now, and starting with the 22.9 release the web access also requires it, in addition to the other features that did. Environments that do not meet this requirement can suffer this issue.

Event code: 3008 

Event message: A configuration error has occurred. 

Event time: 2022-09-22 11:36:30 

Event time (UTC): 2022-09-22 09:36:30 

Event ID: 843e6d92c1434d0580440085b61ac600 

Event sequence: 1 

Event occurrence: 1 

Event detail code: 0 

Application information: 

  Application domain: /W3SVC/1/ROOT-1-133083129901761826 

  Trust level: Full 

  Application Virtual Path: / 

  Application Path: C:\Program Files\M-Files\22.9.11816.9\Server\MFWA\ 

  Machine name: theservernamehere 

Process information: 

  Process ID: 5376 

  Process name: w3wp.exe 

  Account name: IIS APPPOOL\M-Files 22.9.11816.9 

Exception information: 

  Exception type: ConfigurationErrorsException 

  Exception message: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework. (C:\Program Files\M-Files\22.9.11816.9\Server\MFWA\web.config line 125)

  at System.Web.Compilation.MultiTargetingUtil.ValidateTargetFrameworkMoniker(String targetFrameworkMoniker)

  at System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName()

  at System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized()

  at System.Web.Compilation.BuildManager.Initialize()

  at System.Web.Compilation.BuildManager.InitializeBuildManager()

  at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)

Request information: 

  Request URL: https://localhost:443/ 

  Request path: / 

  User host address: ::1 

  User:  

  Is authenticated: False 

  Authentication Type:  

  Thread account name: IIS APPPOOL\M-Files 22.9.11816.9 

Thread information: 

  Thread ID: 6 

  Thread account name: IIS APPPOOL\M-Files 22.9.11816.9 

  Is impersonating: False 

  Stack trace:  at System.Web.Compilation.MultiTargetingUtil.ValidateTargetFrameworkMoniker(String targetFrameworkMoniker)

  at System.Web.Compilation.MultiTargetingUtil.InitializeTargetFrameworkName()

  at System.Web.Compilation.MultiTargetingUtil.EnsureFrameworkNamesInitialized()

  at System.Web.Compilation.BuildManager.Initialize()

  at System.Web.Compilation.BuildManager.InitializeBuildManager()

  at System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags, PolicyLevel policyLevel, Exception appDomainCreationException)

Still need help?