39

I have a project which I have upgraded to .Net 4.0, but when I try to access it, I retrieve the following error:

HTTP Error 404.2 - Not Found
The page you requested could not be displayed because of the settings for the list of ISAPI and CGI restrictions on web server.
ErrorCode: 0x800704ec
Handler PageHandlerFactory-ISAPI-4.0_32bit

Do I need to do something extra to the IIS 7 or APP pool, when converting an existing site to a .NET 4.0 site?

Also if I look at ISAPI both 32bit and 64bit of the .Net 4.0 is installed.

3 Answers 3

93

In IIS, enable .NET 4.

Here is image: enter image description here

6
  • I have the .Net 4 installed in the IIS.
    – Dofs
    Apr 19, 2010 at 6:53
  • When I go to ISAPI in IIS 7 there is no column for me telling if it is allowed or not?
    – Dofs
    Apr 19, 2010 at 7:12
  • 4
    I found out that I had to look in the ISAPI & CGI limitations, and it wasn't enabled. I enabled it and it then worked. Thanks!
    – Dofs
    Apr 19, 2010 at 7:57
  • Bump! Worked for me, also had to set up the domain user permissions on the ASP.Net Temp folder. May 9, 2011 at 20:12
  • 1
    If the image link doesn't display, ctrl+5 to refresh some reason it sometimes reports as being corrupted.
    – Seph
    Jan 3, 2012 at 5:43
9

I take it you're running on IIS6 right now..

Open the IIS manager, and go to the Web Service Extensions area.. You'll be able to enable .NET 4 in there.. All new extensions are disabled by default :)

If you're running on IIS7, .NET might not have registered in IIS.. Then open up an admin command prompt and navigate to the .NET 4 framework folder (C:\Windows\Microsoft.NET\Framework\v4.{version}). If you're on a 64 bit machine go to the Framework64 folder instead of the Framework folder. Then run aspnet_regiis -i in there

3
  • I have updated the post. I am using IIS 7, and I have tried aspnet_regiis -i, but still no difference. I have also changed the app pool to both v4 classic and v4 (regular) and still no difference.
    – Dofs
    Apr 19, 2010 at 6:53
  • I had this exact problem deploying .NET 4 and MVC 3 on IIS 6, thanks.
    – MetaGuru
    Jul 26, 2011 at 18:38
  • I also try according you but still no change.
    – VjyV
    Jul 28, 2016 at 13:15
1

I had this same issue. Strangely, for me it would run in integrated mode but not in classic mode for .NET 4. After enabling the .NET 4 extensions via the Isapi and Cgi restrictions section in IIS 7, it then began working in both modes. The Isapi and Cgi restrictions section is located at the server level node in IIS manager. This option should not be confused with the Isapi Filters section at the site level.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.