c# - ASP.NET Web Api - Target URI and deployment -
so i'm brand new developing api, have existing mvc website published on azure, , create api using asp.net web api template in new project.
my question in deployment. how can deploy api target address like:
www.mymvcwebsite.com/api/etc...
i don't want modify existing mvc site contain api i've seen posts mention less secure, , tutorials i've seen web api template , i'm learning scratch.
within publish azure settings in visual studio gives option publish existing site...would achieve want or there more it?
jk
you need configure routes want be.
routes.maphttproute( name: "api default", routetemplate: "api/{controller}/{id}", defaults: new { id = routeparameter.optional } ); see here
Comments
Post a Comment