If you have installed ASP.NET 4.0 runtime on your system before installing IIS, you may run into this error while trying to run your ASP.NET web projects locally configured in IIS:
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
To fix this error, you can simply register ASP.NET 4.0 runtime with IIS using these steps:
1. Open VS 2010/2008 (if you are using ASP.NET 3.5) command prompt.
2. Type in this command: aspnet_regiis.exe -i
3. After the command has finished running, you will get a message saying: Finished installing ASP.NET (version).
Your site should work now.