Download presentation
Presentation is loading. Please wait.
Published byJefferson Boulden Modified over 10 years ago
9
Web Application ASP.Net IIS
11
App Middleware Server Host
12
Host / IIS Server ASP.Net Web API Web Application
20
Image Source : MSDN
32
config.Routes.MapHttpRoute( name: “DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional} ); public IEnumerable GetResource () { … }
33
[HttpGet(“Demographics/{zipcode?}")] public Demographics Get(int? zipcode) { … } [HttpGet("people/{id:int}")] public Person Get(int id) { … } [HttpGet("people/{name:alpha}")] public Person Get(string name) { … } [HttpGet("Demographics/{zipcode=98052}")] public Demographics Get(int zipcode) { … } config.MapHttpAttributeRoutes(); config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional });
37
NameDescription ClientCertificateGets or sets the client certificate. ConfigurationGets or sets the configuration. IncludeErrorDetail Gets or sets a value indicating whether error details, such as exception messages and stack traces, should be included in the response for this request. IsLocal Gets or sets a value indicating whether the request originates from a local address. Principal.Gets or sets the principal RouteDataGets or sets the route data. Url Gets or sets the factory used to generate URLs to other APIs. VirtualPathRootGets or sets the virtual path root.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.