In Windows Server 2008 if you enabled this feature for .NET 3.5 and then
install .NET 4.0 this will be installed and enabled for .NET 4.0. If this
was not enabled before .NET 4.0 install then this is a little bit more
difficult. Probably the easiest way is to enable this feature for 3.5 and
reinstall .NET 4.0...
See following related question "WCF
.NET 4.5 on Windows Server 2008 R2" on StackOverflow.