asp.net mvc - New area results in 404 -
i've read every thread/question on topic never found answer.
in mvc4 project i've added new area called "admin". see adminarearegistration.vb
has been generated default:
public class adminarearegistration inherits arearegistration public overrides readonly property areaname() string return "admin" end end property public overrides sub registerarea(byval context system.web.mvc.arearegistrationcontext) context.maproute( _ "admin_default", _ "admin/{controller}/{action}/{id}", _ new {.action = "index", .id = urlparameter.optional} _ ) end sub end class
i created "admincontroller" , appropriate view , built project. trying navigate to
/admin
/admin/admin
/admin/admin/index
all ends in failure
i tried deleting admin area , created new 1 called dashboard
admin
controller.
i modified maproute
context.maproute( _ "dashboard_default", _ "dashboard/{controller}/{action}/{id}", _ new {.controller = "admin", .action = "index", .id = urlparameter.optional} _ )
i tried every combination of namespace dashboardarearegistration
namespace areas
namespace areas.dashboard
namespace dashboard
i tried every combination of namespace admincontroller
namespace areas
namespace areas.dashboard
namespace areas.controllers
namespace areas.dashboard.controllers
i tried including namespace in \app_start\routeconfig.vb
imports areas
imports areas.dashboard
imports areas.dashboard.controllers
no change, 404. can do?
after 2 days resolved issue, , i have no idea why worked.
in main web.config
found
<section name="glimpse" type="glimpse.core.configuration.section, glimpse.core" />
this line glimpse - nuget package installed try resolve problem in first place. 1 of features assisting routing debugging. note problem occurred same before , after installed glimpse; don't think it's related.
- i deleted line
- saved
web.config
- refreshed browser, got error (500)
- put line in
- saved again
- refreshed page again, worked; can access
/dashboard
some sort of glitch or corruption?
Comments
Post a Comment