简体   繁体   中英

Why is my catch all not being executed?

I have a Map Route "Catch All", "{*catchall}", new {controller = "Error", action="NotFound"} which doesn't get executed. This Map Route is preceded by two more routes for Error and NotFound. My local environment gets executed just fine. However, another development machine doesn't and I am getting default 404 error page from inetpub. Can you please help me solve this issue? I have IIS 7.0

Have you modified IIS appropriately to handle mvc routing?

Here are the steps to get it to execute on IIS 5 and 6. You'll also want to check to see if you have the correct .net run time dlls on the other development machine to execute the MVC. this is assuming you're not using IIS 7, as I don't know how that is configured to run MVC.

http://haacked.com/archive/0001/01/01/asp.net-mvc-on-iis-6-walkthrough.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM