I have searched everything under the sun! It is driving me insane. I have set up a MVC 4.0 application on IIS 8.5 on windows 8.1 and getting 404 error when routing. Below is my routing defined:
routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{action}",
defaults: new { action = RouteParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
i' ve added: runAllManagedModulesForAllRequests="true" in web.config but no use! i want controller/view to work e.g
<a href ='Controller/View'>Home</a>
the routing via
<a href='@Url.Action("View", "Home")'>Home</a>
this works but my angular module loading/routing fails! My angular is set up as below:
.config(function ($stateProvider, $urlRouterProvider) {
$stateProvider
.state(
"main", {
url: "/",
views: {
'': { templateUrl: '/Partials/MainTemp.html' },
//Menu
'columnOne@main': {
templateUrl: '/Partials/Menu.html',
controller: 'menuCtrl'
},
//Page
'columnTwo@main': {
templateUrl: '/Partials/MainPage.html',
controller: 'mainCtrl'
}
}
})
Everything works fine in debug mode. Am i missing something very basic!