Saturday, 15 January 2011

asp.net mvc - Why am I getting HTTP 404 on all controllers I copied into a new MVC4 project? -



asp.net mvc - Why am I getting HTTP 404 on all controllers I copied into a new MVC4 project? -

i created new mvc4 project, had messed around many default, templated content in 1 working on. set authentication 'none', , copied quite few components, e.g. controllers, base of operations classes, view models, validators (fluent validation) etc. over. kept original home controller , view.

that original home page, through index action, works. 'imported' controllers derive comairricontroller, while home doesn't, tried removing inheritance 1 of controllers , inheriting controller, home, no effect; still 404.

the project builds no errors or warnings @ , runs fine opening home/index view. wrong here? how can diagnose this? constructor comairricontroller doesn't invoked, request isn't getting far @ all.

i using default route configuration:

public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.maproute( name: "default", url: "{controller}/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional } ); }

important information: both source project (pure mvc4) , destination project (orchard module) have same names, , default namespaces. intentionally did avoid many namespace mismatches possible.

new information: have added elmah 2.0.2 via nuget, , set log xml files. logs error each 404, error beingness (i have omitted stack trace brevity):

<error errorid="db2b4236-b913-4b98-878e-f3e02fdff321" application="/" host="7f3kh5j" type="system.web.httpexception" \ message="the controller path '/applicantprofile/start' not found or not implement icontroller." source="system.web.mvc" detail="system.web.httpexception (0x80004005): controller path '/applicantprofile/start' not found or not implement icontroller.&#xd;&#xa;

interestingly, requests elmah.axd homecoming 404.

you mentioned copied on few components existing project, didn't mention whether or not copied on views except home/index action.

could there's no matching view of other controllers?

asp.net-mvc asp.net-mvc-4

No comments:

Post a Comment