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 - Unusual behaviour when drawing lots of images onto a large canvas -

how can i manage url using .htaccess in php? -

javascript - Chart.js - setting tooltip z-index -