25

I am having trouble getting ASP.Net MVC 4 running on IIS 6.

First, i got "Directory listing denied" and that already solved after I setup extensionless urls based on Phil Haack's blog post: ASP.NET MVC on IIS 6 Walkthrough.

Now, I'm getting "The page cannot be found" 404 page.

It's a simple ASP.Net Web Api project in MVC 4 beta.

Anwar Chandra
  • 8,538
  • 9
  • 45
  • 61

3 Answers3

44

Under application configuration, I insert wildcard extension mapping to:

c:\windows\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll

But I forgot to un-check on Verify that file exists checkbox.

Anwar Chandra
  • 8,538
  • 9
  • 45
  • 61
  • 3
    I really hate that checkbox – NickSuperb Dec 10 '12 at 18:06
  • Wow... something so insignificant as a little checkbox causes the entire MVC site to burn in flames. Go figure. – brazilianldsjaguar Apr 19 '13 at 19:52
  • @AnwarChandra, I have followed option 1, 2 & 3 from this blog "http://blog.stevensanderson.com/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/" so far but nothing works! – DOM May 09 '13 at 10:08
  • @DOM you should post your own question on SO with more details. – Anwar Chandra May 12 '13 at 10:03
  • This Q&A would be a lot better if it contained the info from the link in the comments here and also the link in the original question, as neither of those links are valid now. Dang, probably some good answers there... guess I'll keep looking. – eselk Dec 04 '13 at 03:57
3

I fixed this problem using these steps:

  1. Open IIS Console
  2. Select “Web Service Extensions
  3. Select “ASP.NET v4.0.30319”
  4. Click Allow
Igor Krupitsky
  • 787
  • 6
  • 9
0

Most of the time the usual configuration worked for me (wildcard map, uncheck verify...) but it stopped working recently on one Windows 2003 server. I discovered that the previous "Publish..." was done with "precompile" option, which resulted in the App_global.asax.dll and .compiled files in /bin. They were later deleted by mistake during some incremental manual deployment and the Web Api routes were no longer being registered.

I copied the old bin/App_global.* files to server and it worked again.

I also found that to achieve the same effect you can delete the /PrecompiledApp.config file and make sure the /global.asax exists

Ekus
  • 1,679
  • 21
  • 17