PDA

View Full Version : How to get ASP.NET MVC Preview 3 working


infinitedreams13
06-27-2008, 05:30 AM
Thanks toLiam Westley for pointing me in the right direction. http://community.discountasp.net/default.aspx?m=22822&f=33&p=1

Make sureyour global.asax.cs includes:

public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}.mvc.aspx/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" } // Parameter defaults
);
}

andyour Default.aspx.cs has:

public void Page_Load(object sender, System.EventArgs e)
{
Response.Redirect("~/Home.mvc.aspx");
}

SpeedBump
08-10-2008, 02:30 AM
Anyone have luck with Preview 4? I've tried this solution locally and have had no luck.





-Dye


Post Edited (SpeedBump) : 8/10/2008 3:34:15 AM GMT