The following steps will usually resolve this issue:

1. Open a command-prompt, and run the following two commands:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i -enable
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i -enable


2. After this, stop and restart the IIS service.
3. Then try to go to the login page.