ASP.Net MVC routes work locally but not remotely [closed]

假如想象 提交于 2020-02-25 04:46:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!