How to get ASP.NET MVC Preview 3 working

Discussion in 'ASP.NET / ASP.NET Core' started by infinitedreams13, Jun 27, 2008.

  1. 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");
    }
     
  2. 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
     

Share This Page