问题
I know this issue has been addressed before but I have not found an answer to my situation. I have created a MVC website. When I run it locally everything works but upload it to our web sever the routes don't work and I get a 404 error.
Here is my local link http://localhost:49641/
Here is the web address www.hovdenoil.com
Let me know if you need any of my code.
回答1:
Looks like from the headers your site is sending you are running IIS6. There are additional steps required to make routing work on IIS6. You can read about them here:
http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx
http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx
Alternatively, if you have the option, I would highly recommend upgrading to IIS7+, which works much better with MVC's routing.
来源:https://stackoverflow.com/questions/8010911/asp-net-mvc-routes-work-locally-but-not-remotely