Asp.Net MVC: No default page!

Bu konuyu okuyanlar

mstfcck

Asistan
Katılım
18 Mart 2010
Mesajlar
174
Reaksiyon puanı
5
Puanları
0
Sonunda Mvc'ye el atabildim. Fakat ilk oluşturduğum projede aşağıdaki gibi bir hata alıyorum:

Kod:
[B]Server Error in '/' Application.[HR][/HR][/B]

[B][I]The resource cannot be found.[/I][/B]

[FONT=Arial][B]Description: [/B]HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

[B]Requested URL: [/B][/FONT]/Views/Home/Default.aspx[FONT=Arial]
[/FONT]


Sayfa yapılarım şu şekilde:

Kod:
Views
+ Home
-- Default.aspx // Set as default page olarak da denedim.
+ Blog
-- Default.aspx

Global.asax'da bişeyler tanımlamak gerekiyormuş sanırım araştırğım kadarı ile ama ben çalıştıramadım.

Kod:
    public class MvcApplication : System.Web.HttpApplication
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }


        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");


            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );
            
        }


        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();


            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);  
        }
    }


Hatanın çözümü konusunda yardım bekliyorum? :)
 
Üst