This topic describes the issues that .NET Framework 3.5.1 or a language pack cannot be installed on a Windows Elastic Compute Service (ECS) instance and how to resolve the issue by changing the update source of the instance from Windows Server Update Services (WSUS) to Windows Update.
Problem description
- Issue 1: An error is reported for .NET Framework, indicating that the source files cannot be found.
When you install .NET Framework 3.5.1 on an instance that runs Windows Server 2012 R2, Windows Server 2016, or Windows Server 2019, an error is reported, as shown in the following figure.
- Issue 2: A language pack cannot be installed on a Windows instance.
When you switch languages in the Control Panel or search for languages in the Windows Update window, you cannot select or install language packs.
Cause
The preceding issues occur because Windows instances use WSUS as the update source and the installation files of .NET Framework and language packs do not exist in the instances.
Solution
- Connect to the Windows instance.
For more information, see Connect to a Windows instance by using a password or key.
- Start Command Prompt.
- Enter
powershell
to access the PowerShell interactive interface. - Run the following commands to set Windows Update as the update source in the registry:
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 0 Restart-Service -Name wuauserv
- Run the following command to install .NET Framework by using PowerShell:
Install-WindowsFeature Net-Framework-Core
Note You can also continue to install .NET Framework in the Server Manager or install language packs in the Control Panel. - Optional:Run the following commands to set WSUS as the update source:
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 1 Restart-Service -Name wuauserv
- In most cases, Windows Server 2012 and Windows Server 2016 have high memory usage, and memory usage is significantly increased when multiple applications are installed. The issue that .NET Framework cannot be installed due to insufficient memory may occur. To resolve the issue, we recommend that you increase the amount of physical memory. For example, if you use an I/O optimized instance, you can enable the virtual memory based on your business requirements. For more information, see How to configure the virtual memory of a Windows instance.
- If the
0x800f081f
error is reported when you install .NET Framework, check whether the instance can access the Internet as expected. If the instance can access the Internet as expected, the error may be caused by an unstable link to the Windows Update server. We recommend that you try again later.