I'm new to FubuMvc and I'm just playing around with it on a small project.
I have the default nuget package fubu configuration, and I'm using web forms view engine:
public ConfigureFubuMVC()
{
// This line turns on the basic diagnostics and request tracing
IncludeDiagnostics(true);
// All public methods from concrete classes ending in "Controller"
// in this assembly are assumed to be action methods
Actions.IncludeClassesSuffixedWithController();
// Policies
Routes
.IgnoreControllerNamesEntirely().IgnoreControllerFolderName()
.IgnoreMethodSuffix("Html")
.RootAtAssemblyNamespace();
// Match views to action methods by matching
// on model type, view name, and namespace
Views.TryToAttachWithDefaultConventions();
// View Engine
this.Import<WebFormsEngine>();
}
I've created a controller and a view in my site root, like so: ~/IndexController.cs
namespace MovieApp
{
public class IndexController
{
private MoviesDBEntities _db = new MoviesDBEntities();
public MovieIndexViewModel Index()
{
return new MovieIndexViewModel { Movies = _db.Movies.ToList() };
}
public class MovieIndexViewModel
{
public IEnumerable<Movie> Movies { get; set; }
}
}
}
and the View that goes with it: ~/Index.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" MasterPageFile="/Site.Master" Inherits="MovieApp.Index" %>
...
When I browse to ~/Index it works fine.
Now I want to move my controller into a new folder, "Movies". So I move the controller and the view, and I change the namespace on the controller to be MoviesApp.Movies. When I navigate to ~/Movies/Index, it hits a breakpoint in my IndexController.Index() ActionMethod, but then a 404 is displayed.
Any ideas?