In my layout I have a menu with links one of which is:
<li><a href="@Url.Action("Whatistesting", "Testing")">What is testing</a></li>
On localhost this link works as expected and redirects to the appropriate controller and appropriate action. But i've published and all i get a 404 errors yet the path indicated is exactly what it ought to be. Any ideas?
Guys thanks but i got it to work using this solution after Googling a bit One reason this could occur is if you don't have a start page set under your web project's properties. So do this:
Right click on your mvc project Choose "Properties" Select the "Web" tab Select "Specific Page" Assuming you have a controller called HomeController and an action method called Index, enter "home/index" in to the text box corresponding to the "Specific Page" radio button.