Problem in running .net framework 4.0 website on iis 7.0
Go to IIS manager and click on the server name. Then click on the "ISAPI and CGI Restrictions" icon under the IIS header. Change ASP.NET 4.0 from "Not Allowed" to "Allowed".
If you look in the ISAPI And CGI Restrictions, and everything is already set to Allowed, then make sure that the ASP.NET v4.0.30319 handlers are even in the list. In my case they were not. This can be easy to overlook.
I added one for 32 %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll
and another for 64 bit %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll
. You can name them both the same ASP.NET v4.0.30319
.
Check Allow extension path to execute.