R
R
Ruslan2012-10-11 16:25:01
ASP.NET
Ruslan, 2012-10-11 16:25:01

Why is the url not routable?

Hello!
in asp.net mvc3 application add route:

routes.MapRoute(
                "SP",
                "SP/{controller}/{action}/{id}",new { controller = "SPHome", action = "Index", id = UrlParameter.Optional },
                new { controller = @"OrgBill|OrgInfo|SPHome" });

question: why does this route not send a request to localhost :12345/sp/ to the SPHome controller, Index method?
Thank you for your attention.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya, 2012-10-11
@geeek

Most likely added in the wrong place, but I could be wrong. Add this route before the default one.

L
lam0x86, 2012-10-11
@lam0x86

Maybe the controller class is called SPHome instead of SPHomeController?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question