开发者

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 docume开发者_开发百科ntation 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?


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.


A few things that come to mind right away:

  • Your web server may not have the ASP.MVC Framework installed, and your web app deployment doesn't include the MVC dll.
  • The app pool behind your web site isn't running in ASP.NET mode.
  • Your web bits aren't where you think they are (simple file location misunderstanding)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜