Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

404 error when running MVC app on IIS 7 classic pipeline

I have a MVC application that works on cassini, works on IIS 6, but I have issues with in IIS 7. I think my issue has to do with how IIS 7 handles threading in a integrated app pool. So to test my theory I'm trying to get my MVC app running in classic mode on IIS 7. I set my app pool to classic and I add a wildcard script for aspnet_isapi.dll. According to all the documentation I've found this is all I should need to do to get MVC running in IIS 7 classic. However when I try and access the web site I get a 404 error. What am I missing?

like image 413
DanielC Avatar asked May 26 '10 14:05

DanielC


People also ask

Why am I getting a 404 error on ASP NET MVC?

The URL does not match any route in the routing table. A suitable controller is not found. A suitable controller action is not found. The status code of the server's response is 404.

What is the error message for 404 in asp net?

Best web development and SEO practices dictate that any webpage which does not exist, return an HTTP response code of 404, or Not Found. Basically, this response code means that the URL that you're requesting does not exist.

What is IIS in ASP NET MVC?

IIS seems to be an application that listens for incoming connections, parses the data sent there as HTTP requests, and maps request urls to directories based on a site an application and a virtual directory , and then does something based on the file present (or not present) on that location.


1 Answers

You need to turn on wildcard script mapping for MVC to work in Classic mode, I think. If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.

Find the "Handler mappings" icon on you rsite, and the "Add wildcard Script Map" on the right hand side.

Map it to c:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll or whatever version of the framework you are using.

like image 50
Erik A. Brandstadmoen Avatar answered Nov 13 '22 22:11

Erik A. Brandstadmoen