I needed to install .NET 4.7.1 to allow updating Exchange 2013 to CU 21.
This is the installer I downloaded and tried to install: https://www.microsoft.com/en-us/download/details.aspx?id=56116

But the installation never ends. It remains stuck without progressing in the “Installation progress” bar. Tested both with offline and online installation:

Windows - .NET Framework 4.7.1 install stuck hangs

To install .NET Framework 4.7.1 download the msu package from the following link:

Windows - .NET Framework 4.7.1 msu packages install succesfully

It seems that there is some kind of problem with the other format, but the msu worked correctly for me.

Update – For Windows Server 2016 (Thanks to Ryan comment):
If running into the same issue when installing CU10 for Exchange 2016 the msu of .NET 4.7.1 for Windows Server 2016 here it is: https://www.catalog.update.microsoft.com/Search.aspx?q=KB4033393