I have a problem updating an old application that uses Spring.Net. To not have to mess with Spring.Net I've created an area and isolated it to use the DefaultControllerFactory described here.
This works just fine and my Controller loads as I would expect it to, but it is loading the view from the main project and not my area view.
Relevant Project Structure is:
/Areas/App/Controllers/HomeController.cs
/Areas/App/Views/Home/Index.cshtml
/Controllers/HomeController.cs
/Views/Home/Index.aspx
Controller:
namespace Portal.Web.Areas.App.Controllers
{
public class HomeController : Controller
{
// GET: /App/Home/
public ActionResult Index()
{
return View("Index");
}
}
}
View:
@{
Layout = null;
}
<h2>appindex</h2>
If I try to load a view that does not exist like "blubber" it shows the order of folders in which it is searching. This shows my areas folder first. But if the view exists it doesn't load first from this folder.
What is wrong here..., is Spring.Net still mixing stuff or is it plain MVC stuff going wrong?