I recently restored a Sitecore 6.1 website from source control after a hard drive failure and got the following error when trying to start it up from IIS 7.5:
HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll" failed
The application pool was set to .NET Framework v2.0.50727 but the ISAPI filter mentioned above was configured. Removing the 4.0 aspnet_filter resolved the issue.