I have followed all steps on this link including web.config changes and adding required assemblies.
ASP.Net and Webforms in Harmony
I have installed MVC3 into the webforms project and Implemented a controller and registered its routes in Application_Start method of Global.asax.
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
Here is the controller
public class HomeController : Controller
{
//
// GET: /Default1/
public ActionResult Index(int? id)
{
ViewData["Message"] = "Hello from Home controller";
return View();
}
}
I am trying to call its action (i.e /Home/Index) but getting 404 Not Found error.
Route registered for other .aspx form are working fine.
routes.Add("Home", new Route("Home", new RoutingHandler("/Default.aspx")));
Everything is working fine but (Home/Index) is not showing up.