asp.net mvc 4 - ServiceRoute overriding Existing routes -


a newbee in mvc patterns, please bear me.

i have defined serviceroute in global.asax file

  routetable.routes.add(new serviceroute("rest", new webservicehostfactory(), typeof(servicename))); 

this route overriding existing routes. better explain this, setting "/rest/controller/action". has "/controller/action"

routeengine appending serviceroute in actions calls.

how can set exact mapping .

you have use constraints, , register routes in right order.

you can full explanation of what's happening here.

when reading remember mapserviceroute method has dissapeared, , way register services have chosen.

you don't need implement irouteconstraint. can use regex.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -