I have a problem creating ulr routing for an asp.net mvc3 application.
My project has the following structure:
EmployeeReportAreaRegistration.cs:
public class EmployeeReportAreaRegistration : AreaRegistration { public override string AreaName { get { return "EmployeeReport"; } } public override void RegisterArea(AreaRegistrationContext context) { var routes = context.Routes; routes.MapRoute(null, "vykazy/vykazy-zamestnance", new { Area = "EmployeeReport", controller = "Report", action = "List" }); } }
code>
Global.asax:
routes.MapRoute(null, "prihlasit", new { controller = "Login", action = "Login" }); routes.MapRoute("Default", "{controller}/{action}/{id}", new { controller = "Default", action = "Welcome", id = UrlParameter.Optional });
code>
When i try load "http://localhost/app_name/vykazy/vykazy-zamestnance i get this exception : The view 'List' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Report/List.aspx ~/Views/Report/List.ascx ~/Views/Shared/List.aspx ~/Views/Shared/List.ascx ~/Views/Report/List.cshtml ~/Views/Report/List.vbhtml ~/Views/Shared/List.cshtml ~/Views/Shared/List.vbhtml
Well, where am I mistaken?
thanks
source share