If you find this error when trying to set up your website, just open a command prompt and type:

cd c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\
aspnet_regiis.exe -iru

And then:

cd..
cd v2.0.50727
aspnet_regiis.exe -iru

This will register again asp.net 4 & 2 and hopefully your problem will be solved.