This problem occurs because the handler mapping for the requested resource points to a .dll file that cannot process the request.
To resolve this problem:
Edit the handler mapping for the requested resource to point to the .dll file that can process the request. To do this, follow these steps:
1. Click Start, click Run, type inetmgr.exe, and then click OK.
2. In IIS Manager, expand server name, expand Web sites, and then click the Web site that you want to modify.
3. In Features view, double-click Handler Mappings.
4. Right-click the script mapping that you want to edit, and then click Edit.
5. In the Edit Script Map dialog box, type the appropriate executable file in the Executable box, and then click OK.
See details here:
Microsoft Support: Error message when you visit a Web site that is hosted on IIS 7.0: "HTTP Error 500.0 – Internal Server Error"[
^]