In my Global.asax.cs file in RegisterRoutes method, I put
routes.MapRoute("messages",
"Message/{id}",
new { controller = "Archive", action = "Message", id = 0 });
Then I created this controller:
namespace TestingApp.Controllers
{
public class ArchiveController : Controller
{
public string Message(int id)
{
return "testing: you will receive the message: " + id.ToString();
}
}
}
But in my browsser when I go to:
http://.../Message/34
I get a 404.
What else do I need to define so that the routing finds my controller?