asp.net mvc - MVC5 startup URL and routing -- not working on local -


i have project , running fine on website. if deploy now, works fine. issue when i'm trying run in debug mode on local computer--the routing seems messed up.

here project web configuration:

enter image description here

route configuration:

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

on main controller, named pvpcontroller, method named play no no parameters.

when launch project starting debug, url goes (ignore parenthesis):

(http)://localhost:64397/

everything loads fine since routing knows redirect /pvp/play.

however, if type in (http)://localhost:64397/pvp/play, 404 not found error. same thing happens if try call action in pvp controller, including click on links on page load straight debugger.

what's interesting have different controller called pvpadmincontroller. has action named pvpadmin no parameters. if enter type in this:

(http)://localhost:64397/pvpadmin/pvpadmin

the action hit without problems.

is there kind of issue start action , project url doing this? why routing working pvpadmincontroller not pvpcontroller?

thanks!

upon request here's of controller code.

 [initializesimplemembership]     public class pvpcontroller : controller     {         //         // get: /pvp/          public actionresult play()         {         ... bunch of logic....        return view(output);         }     } 

as turns out, solution change localhost port number , let create new virtual directory around that. i'm not entirely sure how happened, think when messing around startup url remapped of files, why getting 404 errors.

still, i'm curious why still connect main play page when using (http)://localhost:64397/ not (http)://localhost:64397/pvp/play .


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -