IIS7 MVC deploy - 404 not found on some actions
Asked Answered
L

1

6

Once deployed parts of my web-application stop working. Index-es on each controller do work, and one form posting via Ajax, Login works too. Other then that yields 404. I understand that nothing particular should be done in integrated mode.

I don't know how to proceed with troubleshooting.

Some info:

  • App is using default app pool set to integrated mode.
  • WebApp is done in net framework 3.5.
  • I use default routing model.
  • OS is Windows Server 2008.
  • IIS 7

Any help is appreciated. Thx.

EDIT: I determined that only actions that accept ID parameter don't work. On the contrary, when I add dummy id method in Home controller of default MVC app it works.

EDIT 2: I found the problem. Links on few pages of the site didn't use ActionLink helper. It was harder to see because of the Ajax invoking. So, never hardcode links to the actions on the site, even temporary.

Legionary answered 7/4, 2010 at 14:49 Comment(6)
when you say that the index views are working, are your urls pointed directly at the index, or is it hitting the default mapping? I.e., /mycontroller/index vs. /mycontrollerLeila
Default mapping, but it works if I append /Index too.Legionary
Is your target server IIS 6 or 7?Leila
7 see more details aboveLegionary
can you post the contents of the web.config inside your views folder?Leila
You should post your last edit (EDIT 2) as the answer. Looks like this question is unanswered.Leila
M
2

Please go through this link for details on deploying MVC application with IIS 7 integrated mode.

http://www.asp.net/mvc/tutorials/older-versions/deployment/using-asp-net-mvc-with-different-versions-of-iis-cs

Marable answered 7/4, 2010 at 14:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.