Building HTTP Services with ASP.NET Web API Sayed Ibrahim Hashimi Program Manager Microsoft Corporation DEV309.

Slides:



Advertisements
Similar presentations
What’s New in Windows Communication Foundation in Microsoft.NET 4.5 Daniel Roth Senior Program Manager Microsoft Corporation DEV326.
Advertisements

Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog
Introducing the New Visual Studio 2012 Unit Testing Experience Peter Provost Sr. Program Manager Lead Microsoft Corporation DEV214.
Working on an Agile Team with Visual Studio 2012 and Team Foundation Server 2012 Peter Provost Sr. Program Manager Lead Microsoft Corporation DEV318.
Introducing the New Visual Studio 2012 Unit Testing Experience Peter Provost Sr. Program Manager Lead Microsoft Corporation DEV214.
Troubleshooting Windows 7 Deployments Michael Niehaus Senior Program Manager Microsoft Corporation.
CS320 Web and Internet Programming Handling HTTP Requests Chengyu Sun California State University, Los Angeles.
Dev-Ops Best Practices on the Microsoft Stack Victor Mushkatin Group Program Manager Microsoft Corporation DEV363.
Deep Dive into the Team Foundation Server 2012 Agile Planning Tools Gregg Boer Principal Program Manager Microsoft Corporation.
Visual Studio Tips & Tricks Dustin Campbell Microsoft Corporation Scott Cate EventDay.com DEV319.
Implementing Scrum Using Team Foundation Server Richard Hundhausen President, Accentient DEV212.
Implementing Team Foundation Server in the Enterprise: Guide to a Successful Implementation Jeff Levinson Solutions Architect The Boeing Company DEV343.
C++ Accelerated Massive Parallelism in Visual C Kate Gregory Gregory Consulting DEV334.
Dev-Ops Best Practices on the Microsoft Stack Victor Mushkatin Group Program Manager Microsoft Corporation DEV363.
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control Maarten
Building Metro style UIs Paul Gusmorino Lead Program Manager Microsoft Corporation DEV354.
Building Metro style apps with HTML and JavaScript Paul Gusmorino Lead Program Manager Microsoft Corporation.
ASP.NET Web API Udaiappa Ramachandran NHDN-Nashua.NET/Cloud Computing UG Lead Blog:
Model Lync Server 2013 REST API Media Manager (Media State) UI Lync Web App Lync for Windows Phone Lync for iPhone Lync for iPad Lync for.
Building Metro style apps with HTML and JavaScript Paul Gusmorino Lead Program Manager Microsoft Corporation.
Visual Studio Tips & Tricks Dustin Campbell Microsoft Corporation Scott Cate EventDay.com DEV319.
ASP.NET Web API. ASP.NET Members MS Open Source ASP.NET MVC 4, ASP.NET Web API and ASP.NET Web Pages v2 (Razor) now all open source ASP.NET MVC 4, ASP.NET.
CS320 Web and Internet Programming Handling HTTP Requests Chengyu Sun California State University, Los Angeles.
The Accidental Team Foundation Server Admin Anthony Borton ALM Trainer and Mentor QuickLearn Inc. DEV345.
Visual C#/Visual Basic: Becoming a Guru with Existing Features Peter Ritchie Principle Peter Ritchie Inc. Software Consulting DEV325.
Creating LOB Metro style Apps in XAML Using Blend and Visual Studio Jeffrey Ferman Program Manager Microsoft Corporation DEV369.
Web Service Programming with WCF 3.5 Eyal Vardi CEO E4D Solutions LTD Microsoft MVP Visual C# blog:
Windows Phone: Building Enterprise Apps Rob Tiffany Architect Microsoft Corporation WPH207.
Paul D. Sheriff DEV216 MVVM Made Easy Paul D. Sheriff
Continuous Delivery of Windows Azure Cloud Services (DEV310) Paul Yuknewicz Principal Program Manager Lead, Visual Studio Microsoft.
Identify & Fix Performance Problems with Visual Studio 2012 Ultimate Benjamin Day Benjamin Day Consulting, Inc. benday.com/blog
Demystifying Team Foundation Server Builds Mickey Gousset Principal Consultant Infront Consulting Group DEV342.
What’s New in WF4.5 Dave Cliffe Program Manager Microsoft Corporation.
Building a Web API for browser/JSON clients.
Taking Control of Visual Studio through Extensions and Extensibility Anthony Cangialosi Senior Program Manager Lead Microsoft Corporation DEV311.
What’s New in WCF 4.5? Richard Blewett Rock Solid Knowledge Ltd DEV326.
OSP201: Creating Self- Service BI Solutions with SharePoint Server 2010 Peter Myers.
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
What’s New in.NET 4.5 Layla Driscoll Senior Program Manager Microsoft Corporation.
What web developers need to know when building Metro style apps Scott Dickens Principal Program Manager Lead Microsoft Corporation DEV352.
DEV354. Describe your data Create screens for common tasks Author business logic Customize screen layouts Define custom queries Create custom Silverlight.
ASP.NET Loves HTML5 Mads Kristensen Program Manager Microsoft Corporation DEV303.
ADO.NET Entity Framework 4.3 for Real Web Applications Adam Tuliper Software Architect Cegedim DEV215.
Spaso Lazarević Microsoft MVP Nova banka ad Banja Luka Building business application using Visual Studio 2013 LightSwitch.
Async Made Simple in Windows 8, with C# and Visual Basic Alex Turner Program Manager VB/C# Compilers Microsoft Corporation DEV332.
Unit testing of the Services Telerik Software Academy Web Services and Cloud.
Going Beyond F11: Debug Better and Faster with Visual Studio 2012 Brian A. Randell Senior Consultant MCW Technologies DEV317.
Going Beyond F11: Debug Better and Faster with Visual Studio 2012 Brian A. Randell Senior Consultant MCW Technologies DEV317.
Building Metro style apps with XAML with.NET Tim Heuer Program Manager Microsoft Corporation DEV353.
TechEd /1/2018 7:56 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
What web developers need to know when building Metro style apps
12/2/2018 4:10 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Using Windows Runtime and SDK to build Metro style apps
Deep Dive into the Team Foundation Server 2012 Agile Planning Tools
Advanced IntelliTrace in Production
Building HTTP Services with ASP.NET Web API
Building HTTP services for modern client apps
2/17/2019 7:32 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Integrating with Windows 8 Experiences
From Development to Production: Optimizing for Continuous Delivery
Building Business Applications in LightSwitch
Using Windows Runtime and SDK to build Metro style apps
ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more
Creating and Consuming OData Services for Business Applications
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Brandon Bray Principal Group Program Manager Microsoft Corporation
What’s New in Visual Studio LightSwitch
4/19/2019 1:57 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
Building RESTful services using OData
What’s New in Visual Studio 2012 for Web Developers
Presentation transcript:

Building HTTP Services with ASP.NET Web API Sayed Ibrahim Hashimi Program Manager Microsoft Corporation DEV309

Designed for broad reachUses HTTP as an application protocol, not a transport protocol

Why build Web APIs?

GET /en/html/dummy.php?name=MyName&married=not+single &male=yes HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Windows;en-GB; rv: ) Gecko/ Firefox/ Accept: text/xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer:

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation Contact Manager browser and mobile app

? ASP.NET MVC WCF Web HTTP WCF REST Starter Kit WCF Web API

+ ASP.NET MVC WCF Web HTTP WCF REST Starter Kit WCF Web API

ASP.NET Web API

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation Your First Web API

Default Web API route routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } );

Content Negotiation // Get the IContentNegotiator IContentNegotiator negotiator = Configuration.Services.GetContentNegotiator(); // Run content negotiation to select a formatter MediaTypeHeaderValue mediaType; MediaTypeFormatter formatter = negotiator.Negotiate( typeof(Contact), Request, Configuration.Formatters, out mediaType); // Create a response message with an object content using the selected formatter HttpResponseMessage response = new HttpResponseMessage() { Content = new ObjectContent (contact, formatter), RequestMessage = Request };

Content Negotiation HttpResponseMessage response = Request.CreateResponse (HttpStatusCode.Created, contact);

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation Scaffolding an EF-based web API

Invoke Action Action filters Model Bind Select actionException filters Route to controllerFormatting RequestResponse Authorization filters

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation OData query support

Http Client Handler Host Http Dispatcher Http Server Message handlers: Task SendAsync( HttpRequestMessage request, CancellationToken cancellationToken)

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation URI format extensions

IApiExplorer IApiExplorer apiExplorer = config.Services.GetApiExplorer(); public interface IApiExplorer { Collection ApiDescriptions { get; } }

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation Custom web API help page

demo Sayed Ibrahim Hashimi Program Manager Microsoft Corporation Flexible hosting

DEV301 ASP.NET Roadmap: One ASP.NET – Web Forms, MVC, Web API, and more DEV302 What's New in Visual Studio 2012 for Web Developers DEV303 ASP.NET Loves HTML5 DEV304 ASP.NET for Mobile and Tablet Development DEV305 Microsoft ASP.NET and the Realtime Web

Visual Studio Home Page :: Jason Zander’s Blog :: Facebook :: Twitter :: Somasegar’s Blog ::

Connect. Share. Discuss. Learning Microsoft Certification & Training Resources TechNet Resources for IT Professionals Resources for Developers

Evaluations Submit your evals online

Why build Web APIs?