Forum Discussion

Yoann's avatar
Yoann
Copper Contributor
Aug 18, 2021

Windows Server 2019 and .NET 4.8?

Hello,

 

On a fully updated Windows Server 2019, roles and features allow me to install only .NET 4.7.

 

One of the solution we are using require .NET 4.8 (Adaxes).

 

When I install .NET 4.8 using the installer available here https://support.microsoft.com/en-us/topic/microsoft-net-framework-4-8-offline-installer-for-windows-9d23f658-3b97-68ab-d013-aa3c3e7495e0

 

It works, I can install Adaxes, but it break ServerManager as well as Azure AD Connect.

 

What's the correct procedure to install .NET 4.8 on Server 2019 without breaking anything else?

 

Thanks a lot

  • DavidSherrill's avatar
    DavidSherrill
    Brass Contributor
    I ran into this issue after the Windows Update, Cumulative Update for .NET Framework (KB5006765), was installed on a Windows Server 2019 that also had Azure AD Connect installed. Apparently, a bunch of .NET registry items where deleted. Server Manager and any software built on .NET was not working...throwing this error:

    This application requires one of the following versions of the .NET Framework: v4.0.30319
    Do you want to install this .NET Framework version now?

    DSIM and SFC repairs did not work, nor did rolling back the Windows Update.

    Found some insight here:
    https://www.bleepingcomputer.com/forums/t/758800/net-48-kills-server-2019/

    Ended up having to import these registry items from a working system:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.3]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.3,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.3]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\Default]

    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319]
    "AspNetEnforceViewStateMac"=dword:00000001
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.3]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.3,Profile=Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5.3]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.6.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7.1]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.7.2]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\Client]
    [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319\SKUs\Default
    • tmCMF-Jody's avatar
      tmCMF-Jody
      Copper Contributor

      DavidSherrill 

       

      You sir, are a gentleman and a scholar.  Thanks for the information. 

       

      I had the same issue and received zero help or support from Microsoft.  Dell support googled and read back to me everything I had googled and tried already.  Importing the above registry information fixed it without a reboot. :stareyes:

    • BZoli's avatar
      BZoli
      Copper Contributor
      Thank you man, you saved my life! After hours of hard work I saved your registry keys to a .reg file, write a "Windows Registry Editor Version 5.00" string to it's header and successfully import it. Server Manager is working again and I'm able to start all broken services again!
    • JW-Moose's avatar
      JW-Moose
      Copper Contributor
      I just wanted to add my thanks as well as I was having a hard time finding the resolution to this issue until I found your post. Here here!
  • RichardA's avatar
    RichardA
    Copper Contributor
    Genuis! I don't know who originally solved this, but your solution worked, thanks very much. After many hours of repairing .NET, rebooting and getting the same error, going around in circles I eventually found this post and it worked. Thanks!
    • LordHellFire's avatar
      LordHellFire
      Copper Contributor

      RichardA 
      I figured out the solution to copy .net registry settings from a working computer back in march '22 after working the problem sweating bullets for hours myself trying to fix our tertiary ADC-server. Luckily the primary and secondary were not hit with the same problem.

       

      No amount of uninstalling/installing fixed it.
      But "simply" export the reg keys from a working computer and import them in the broken server, and that worked. A restart is always a good idea to ensure everything starts up properly.

      I'm mortified that Microsoft still haven't fixed the problem/issue... that it is still occurring even now!

      The original problem-poster (User named: action-undo-balance) of the BleepingComputer forum mentioned this as the potential cause of the problem:

       


      After many many hours of research on this I've gotten to the bottom of this. The issue is this TLS 1.2 enforcement script:

       

      https://docs.microsoft.com/en-us/azure/active-directory/hybrid/reference-connect-tls-enforcement#powershell-script-to-enable-tls-12

       

      Only a few days ago this script was different - it wasn't wrapped in that "if" statement. You can see the commit here: 

      https://github.com/MicrosoftDocs/azure-docs/commit/e2110e5c7c59359b4ffbcb120bcfa9e736f7d7c7#diff-fe074957cf8e301b788a062c973bc4248318e58492057dff730f1f86f2718f3e

       

      The problem is this line:

      New-Item 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319' -Force | Out-Null

      Which creates that path (if it doesn't exist). If it does exist (which it does by default on Server 2019) it empties it.

       

      Microsoft could probably fix the problem by changing the installer to always recreate those redirects for earlier versions of .net.

  • AndreasSH's avatar
    AndreasSH
    Copper Contributor

    Yoann 

     

    The problem still exists and this post saved my day!!

    Thank you very much...

     

    Andreas

  • N1KZ76's avatar
    N1KZ76
    Copper Contributor

    Yoann same issue here. Clean install of Windows Server 2019 latest build, install .NET Framework offline installer 4.8, reboot and boom. Many native control panels, like Server Manager, requesting some 4.0.... version of .NET framework instead, failing to load.

     

    • BD9999's avatar
      BD9999
      Copper Contributor
      How did you get the offline installer for 4.8.1 to work?
      • Manuel618's avatar
        Manuel618
        Copper Contributor

        BD9999 

        I have struggling and trying to fix this problem for about six months !   This is the only fix that actually worked!  Thank you so much to the genius that created this fix and thank you to those that posted it.!

         

                                                                                                       Manuel A Calcagno

  • BD9999's avatar
    BD9999
    Copper Contributor
    offline installer for 4.8 works fine, but the offline installer for 4.8.1 says it's not supported. It's an old app, I'll just stick to 4.8.

Resources