404 - Page cannot be found

Last post 02-16-2009 10:09 PM by robconery. 5 replies.

Sort Posts:

  • 404 - Page cannot be found

    02-06-2009, 11:20 PM
    • Member
      point Member
    • mrnd
    • Member since 05-28-2007, 1:48 AM
    • Posts 2

    I use sample of MVC when test with VS 2008 on run mode is ok (http://localhost/TestMVC/Home/About)

    but when i setup this website on IIS ver 5 (at the same computer) error 404 (- Page cannot be found) is happen (http://localhost/TestMVC/Home/About)

    after that i must be modify code in Global.asax like this

     

    public static void RegisterRoutes(RouteCollection routes)
            {
                routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
                routes.MapRoute("Default", "{controller}.aspx/{action}/{id}", new { action = "Index", id = "" });
                routes.MapRoute("Root", "", new { controller = "Home", action = "Index", id = "" });
            }
            protected void Application_Start()
            {
                RegisterRoutes(RouteTable.Routes);
            }  

      

    it run, but url like this http://design3/TestMVC/Home.aspx/About how can change to http://localhost/TestMVC/Home/About

    Pls help me to fix this error??

     

    *** I'm sorry, I don't know english well :)

  • Re: 404 - Page cannot be found

    02-06-2009, 11:26 PM
  • Re: 404 - Page cannot be found

    02-08-2009, 9:09 PM
    • Member
      point Member
    • mrnd
    • Member since 05-28-2007, 1:48 AM
    • Posts 2

     Thask's

     But it not useful for this error. Any solution??

  • Re: 404 - Page cannot be found

    02-09-2009, 12:01 AM
    • Member
      532 point Member
    • pure.krome
    • Member since 05-28-2006, 4:45 AM
    • Melbourne, Australia
    • Posts 348

     >>but when i setup this website on IIS ver 5 (at the same computer) error 404

     er.. why are u still using iis5? I'm not sure if this works on 5, but it's been tested against iis6 and iis7. If you're using Vista, then that's iis7. With iis6, you'll need to register the .mvc extension to get it to work. With iis7, it will just work, i believe.

    :: Never underestimate the predictability of stupidity ::
  • Re: 404 - Page cannot be found

    02-12-2009, 2:39 PM
    • Member
      2 point Member
    • aminna
    • Member since 02-12-2009, 7:33 PM
    • Posts 1

    Hi

    I thinked link useful for you

    http://www.asp.net/learn/mvc/tutorial-08-cs.aspx

  • Re: 404 - Page cannot be found

    02-16-2009, 10:09 PM
    • Participant
      846 point Participant
    • robconery
    • Member since 02-23-2005, 5:16 PM
    • Posts 192
    • AspNetTeam

    I'm not totally positive, but I think MVC won't work on IIS 5.

Page 1 of 1 (6 items)