The following returns "/Settings"
Url.Action("Index", "Settings");
On my local this renders fine. However on my remote machine I get the error belows. I get the impression that the controller is not properly instantiated.
Parser Error Message: Could not load type 'System.Web.Mvc.ViewPage<EStore.Domain.ViewModel.SettingsViewModel>'.
Line 1: <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<EStore.Domain.ViewModel.SettingsViewModel>" %>
Global.asax
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
routes.MapRoute(
"AdminCompany",
"{controller}/{action}/{companyId}/{id}",
new { controller = "Home", action = "Index", companyId = "", id = "" }
);
routes.MapRoute(
"Status",
"{controller}/{action}/{id}/{statusId}",
new { controller = "Home", action = "Index", id = "", statusId = ""}
);
routes.MapRoute(
"Admin",
"admin/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = "" }
);
Index Actions
public ActionResult Index()
{
var viewModel = IndexViewModel();
return View(viewModel);
}