Microsoft Net Framework 4.5 2 For Windows 7 32 Bit

0 views
Skip to first unread message

Vernon

unread,
Aug 5, 2024, 8:25:41 AM8/5/24
to paimindithe
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.

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.


@DavidSherrill This is the exact fix! For us, our RMM tool stopped working on a server 2019 standard server. It's services wouldn't start. Event Viewer complained about .net. Also server manager wouldn't open with the exact message you mentioned. Applying this fixed it all. thanks!!


YOU ARE AN ABSOLUTE LEGEND! THANK YOU! THIS IS THE ONLY SOLUTION THAT WORKED! Every other solution I've googled of this problem has been some variation of "turn net framework on/off in the "turn windows features on or off" app" or "reinstall the newest version of .net" or "did you try restarting your computer?" (OF COURSE I TRIED RESTARTING MY COMPUTER!! DO THEY THINK I'M AN INFANT??)


Please excuse my novice status displayed in this question, but does one simply copy/paste the text in your registry update file, and does the resulting text file require the line number entries as displayed in your post?


Windows Containers should be used as a way to improve deployments to production, development, and test environments of existing .NET applications based on .NET Framework technologies like MVC, Web Forms or WCF.


But, under the covers, in order to run a container you need to create a Docker image and have it ready in your local Docker image repository. That is done under the covers by Visual Studio when you run it with F5 or Ctrl+F5:


Before you run the solution, you must make sure that you configure Docker to use Windows Containers. To do that, you right-click the Docker taskbar icon in Windows and select Switch to Windows Containers, as shown in the figure below.


You can do the following steps by adding "Add Docker Support" to the baseline eShopLegacyMVCSolution, for instance, by pulling that project into your machine and opening the eShopLegacyMVC.sln solution.


Visual Studio provides great support for containerizing an application. You right-click the project node and then select Add and Docker Support. The Docker project template adds a new project to the solution called docker-compose. The project contains the Docker assets (simple .yml metadata files) that comprise the Docker images and containers' startup settings you need, as shown in the figure below.


In the simplest monolithic scenarios like this one, the application will be a single application service/container defined at the docker-compose.yml file that you will need to deploy. In other more complex scenarios like N-Tier applications, you will have a multi-container application defined in the docker-compose.yml file.


The template also changes your startup project to point to the docker-compose project so it will run on Docker when launching the solution.Pressing Ctrl+F5 or F5 now compiles the .NET application bits, creates the Docker image, and launches the Docker container all in a single step for you, as shown in the next image.


When VS is building the Docker image the first time you do this, it takes some time (a few minutes). This is because the build process pulls down the base Windows Server Core image and the additional image for ASP.NET. Subsequent build and run cycles will be much faster, since these image files are cached locally.


Let's take a deeper look at the files added by the Docker project template. It created several files for you. Visual Studio uses these files to create the Docker image and launch a container. You can use the same files from the CLI to run Docker commands manually with the Docker CLI commands like docker run and docker-compose up.


For each application or service in your solution Visual Studio adds a dockerfile to your project's root folder, similar to the following Dockerfile example showing the basic settings for building a Docker image based on the Windows ASP.NET image that runs an ASP.NET site.


This previous Dockerfile will look very similar to those created for running an ASP.NET Core application in Linux containers. However, there are a few important differences. The most important difference is that the base image is microsoft/aspnet, which is an image based on Windows Server Core image that includes IIS, the .NET Framework and special optimizations for ASP.NET.


The other files in the docker-compose project are the Docker assets needed to build and configure the containers.Visual Studio puts the various docker-compose.yml files under one node (project) to highlight how they are used. The base docker-compose file contains the directives that are common to all configurations/environments. The docker-compose.override.yml file contains environment variables and related overrides for a by-default developer configuration.


There are a couple of differences between the development configuration and a production configuration. In the development environment, you run the ASP.NET application and SQL Server in Windows Containers, within the same Docker host. In earlier sections, we mentioned that for development environments you could use a SQL localdb within the same application Windows Container or deploying an independent SQL Server Windows Container.


The advantage of running the database along with the multiple application containers within the same Docker host (or even orchestrator cluster looking forward) is that you have a very predictable testing environment with a consistent database that can have the same pre-generated data generated when deploying to the testing environment in the Docker host.


*** Optional finish of the walkthrough ***At this point you already containerized the application.The next sections focus on alternative approaches and more advanced scenarios you might need and you can also explore.


As an alternative option, in order to build the .NET bits from the CLI or from a CI pipeline, you need a build container or Docker build agent that will be internally using MSBuild to compile your .NET code. You can explore this walkthrough on "How to create a custom image for a .NET Framework build container internally using MSBuild".


Another way to migrate existing .NET application from Windows VM running IIS towards Windows Containers, without using a developer tool like Visual Studio, is to use Image2Docker, an open-source tool originally created and provided by Docker (the company).


Image2Docker is basically a PowerShell module that migrates existing Windows application from VMs to Windows Container images. Although it supports multiple application types, the main focus is on IIS. You can use Image2Docker to export ASP.NET websites from a VM, so you can run them in a Windows Container with no application changes.


In many cases, your existing .NET applications are not based just on your .NET code solution and the .NET Framework libraries but also based on additional artifacts from Windows that have to be enabled (IIS, .NET WCF HTTP Activation, Server roles, etc.) and even additional components from third parties that you need to install in windows through .MSI setups. You can perform those steps in a declarative way within the declared commands within your dockerfiles.


In order to install an MSI within a Windows Container you just need to copy in the .msi file and run msiexec to install it. For instance, the following dockerfile specifies how to install a .msi in your container.


That .msi setup could install whatever dependency you might need for your application, like the .DLLS of a PDF creator library (or any other comparable case) that you might need to use from your ASP.NET application.


You can also, of course, add these steps to your previous dockerfile so you may end up with multiple COPY commands (your application plus additional .MSIs) and therefore you could also execute multiple RUN commands from your dockerfile.


In order to enable Windows features or artifacts (like .NET WCF HTTP Activation, IIS configuration, etc.) in a Windows Container, you need to specify those dependencies in your dockerfile so they will be installed when the container is deployed.


The important line in that dockerfile is the line with the RUN command that specifies to add certain Windows Feature, in this case, .NET WCF HTTP Activation.Note that not all the Windows features can be activated in Windows Containers since some of them are not supported, like MSMQ or other cases.

3a8082e126
Reply all
Reply to author
Forward
0 new messages