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

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

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

ios - I get the error Property '...' not found on object of type '...' -