SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
1
ASP.NET Web API deep dive
Manfred Steyer
About me …
Manfred Steyer
Trainer & Consultant
Angular & .NET
Page  2
2
Goal
Show advanced features
of ASP.NET Web API
Only some Slides
Live Coding
Folie 4
Contents
 Configure Formatters
 Binary Serialization
 Custom Formatters
 Streaming
 Versioning
 OData with and without EF + restricting it
 Metadata via Swagger
 Security
Folie 5
3
FORMATTERS
DEMO
Page  6
STREAMING
DEMO
Page  7
4
Streaming in IIS (without OWIN)
Folie 8
config.Services.Replace(
typeof(IHostBufferPolicySelector),
new CustomWebHostBufferPolicySelector());
VERSIONING
Page  9
5
Two kinds of changes
Compatible Changes
 Additional optional field etc.
 Changes to the minor version, e. g. 1.1 to 1.2
Breaking Change
 New Method/ Class
 Changes to the major version, e. g. 1.2 to 2.0
 Identity by URL or HTTP-Header
 api-version: 1.2
Folie 10
DEMO
Page  11
6
ODATA
Page  12
What is ODATA
Standard for "SQL over HTTP"
Querying: ?$filter=From eq 'Vienna'
Also allows for editing
NuGet: Microsoft.AspNet.OData
Folie 13
7
SWAGGER
Page  14
Swagger
Metadata for Web APIs
Implementation for .NET: Swashbuckle
Every Action-Method has to have its own URL
NuGet: Swashbuckle
Folie 15
8
DEMO
Page  16
SECURITY
Page  17
9
HTTP BASIC
Transmitting username + password via
HTTP-Headers
 Base64-encoded: No encryption
 Just use with HTTPS
IIS checks username + password against
Windows/AD
OWIN-Middleware to check them by yourself:
 Thinktecture.IdentityModel.Owin.BasicAuthentication
Folie 18
Tokens
Folie 19
Client
Authorization-Server
Resource-Server
3. Token
Central Accounts
Auth. decoupled
Tokens provide flexibility
10
Solutions for Web APIs
Microsoft:
Microsoft.Owin.Security.Jwt
IdentityServer:
IdentityServer3.AccessTokenValidation
Folie 20
DEMO
Page  21
11
Summary
 Formatters for reading and writing Objects
 Streaming for performance
 Versioning with RouteContraint
 OData
 Metadata via Swagger and Swashbuckle
 Security with HTTP BASIC and Tokens
Folie 22
manfred.steyer@SOFTWAREarchitekt.at
SOFTWAREarchitekt.at
ManfredSteyer
Contact

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Talk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG BéninTalk for DevFest 2021 - GDG Bénin
Talk for DevFest 2021 - GDG Bénin
 
Kentico MVC Widgets
Kentico MVC WidgetsKentico MVC Widgets
Kentico MVC Widgets
 
Live session 2 lightning web component
Live session 2 lightning web componentLive session 2 lightning web component
Live session 2 lightning web component
 
DevIntersections 2014 Web API Slides
DevIntersections 2014 Web API SlidesDevIntersections 2014 Web API Slides
DevIntersections 2014 Web API Slides
 
Advantages of angular 8
Advantages of angular 8Advantages of angular 8
Advantages of angular 8
 
Building blocks of Angular
Building blocks of AngularBuilding blocks of Angular
Building blocks of Angular
 
Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps Learn Angular 9/8 In Easy Steps
Learn Angular 9/8 In Easy Steps
 
Building HTTP APIs with ASP.NET Core
Building HTTP APIs with ASP.NET CoreBuilding HTTP APIs with ASP.NET Core
Building HTTP APIs with ASP.NET Core
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 
Angular 4 fronts
Angular 4 frontsAngular 4 fronts
Angular 4 fronts
 
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
 
Angular 9 New features
Angular 9 New featuresAngular 9 New features
Angular 9 New features
 
Angular 2 - Core Concepts
Angular 2 - Core ConceptsAngular 2 - Core Concepts
Angular 2 - Core Concepts
 
Angular 2
Angular 2Angular 2
Angular 2
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
 
Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)Intro to Salesforce Lightning Web Components (LWC)
Intro to Salesforce Lightning Web Components (LWC)
 
Angular4 getting started
Angular4 getting startedAngular4 getting started
Angular4 getting started
 
Entity framework (EF) 7
Entity framework (EF) 7Entity framework (EF) 7
Entity framework (EF) 7
 
PPT on Angular 2 Development Tutorial
PPT on Angular 2 Development TutorialPPT on Angular 2 Development Tutorial
PPT on Angular 2 Development Tutorial
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 

Destaque

Destaque (11)

Azure api apps - Deploy ASP.Net Core
Azure api apps - Deploy ASP.Net CoreAzure api apps - Deploy ASP.Net Core
Azure api apps - Deploy ASP.Net Core
 
Azure api app autenticação e autorização
Azure api app   autenticação e autorizaçãoAzure api app   autenticação e autorização
Azure api app autenticação e autorização
 
Aspnet core
Aspnet coreAspnet core
Aspnet core
 
ASP.NET Core Security
ASP.NET Core SecurityASP.NET Core Security
ASP.NET Core Security
 
Building a Web API with ASP.Net Core
Building a Web API with ASP.Net CoreBuilding a Web API with ASP.Net Core
Building a Web API with ASP.Net Core
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessible
 
Web api
Web apiWeb api
Web api
 
The Ultimate Guide to Mobile API Security
The Ultimate Guide to Mobile API SecurityThe Ultimate Guide to Mobile API Security
The Ultimate Guide to Mobile API Security
 
Beautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with IonBeautiful REST+JSON APIs with Ion
Beautiful REST+JSON APIs with Ion
 
Build a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.jsBuild a REST API for your Mobile Apps using Node.js
Build a REST API for your Mobile Apps using Node.js
 
Building Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreBuilding Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET Core
 

Semelhante a ASP.NET Web API Deep Dive - SSD 2016 London

Was 5.1 To 6.1
Was 5.1 To 6.1Was 5.1 To 6.1
Was 5.1 To 6.1
tsmanyam
 
Was 5.1 To 6.1 Updated
Was 5.1 To 6.1 UpdatedWas 5.1 To 6.1 Updated
Was 5.1 To 6.1 Updated
tsmanyam
 
What’s New for Devs
What’s New for DevsWhat’s New for Devs
What’s New for Devs
MicrosoftFeed
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
jedt
 
Net Framework Hima
Net Framework HimaNet Framework Hima
Net Framework Hima
HimaVejella
 

Semelhante a ASP.NET Web API Deep Dive - SSD 2016 London (20)

.Net5.0 training noida (1)
.Net5.0 training noida (1).Net5.0 training noida (1)
.Net5.0 training noida (1)
 
ASP.NET 4.0 Demo
ASP.NET 4.0 DemoASP.NET 4.0 Demo
ASP.NET 4.0 Demo
 
What's New in Visual Studio 2010
What's New in Visual Studio 2010What's New in Visual Studio 2010
What's New in Visual Studio 2010
 
What's new in vs 2010 sp1 for web developers
What's new in vs 2010 sp1 for web developersWhat's new in vs 2010 sp1 for web developers
What's new in vs 2010 sp1 for web developers
 
ASP.NET Core 1.0 Overview
ASP.NET Core 1.0 OverviewASP.NET Core 1.0 Overview
ASP.NET Core 1.0 Overview
 
A Microsoft primer for PHP devs
A Microsoft primer for PHP devsA Microsoft primer for PHP devs
A Microsoft primer for PHP devs
 
Netbeans 6.1 Talk
Netbeans 6.1 TalkNetbeans 6.1 Talk
Netbeans 6.1 Talk
 
Was 5.1 To 6.1
Was 5.1 To 6.1Was 5.1 To 6.1
Was 5.1 To 6.1
 
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney BuikeMake Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
 
Was 5.1 To 6.1 Updated
Was 5.1 To 6.1 UpdatedWas 5.1 To 6.1 Updated
Was 5.1 To 6.1 Updated
 
ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2ASP.NET Core 1.0 Overview: Pre-RC2
ASP.NET Core 1.0 Overview: Pre-RC2
 
What’s New for Devs
What’s New for DevsWhat’s New for Devs
What’s New for Devs
 
SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011
 
SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
 
Net Framework Hima
Net Framework HimaNet Framework Hima
Net Framework Hima
 
ASP.NET Core 1.0 Overview: Post-RC2
ASP.NET Core 1.0 Overview: Post-RC2ASP.NET Core 1.0 Overview: Post-RC2
ASP.NET Core 1.0 Overview: Post-RC2
 
Getting Started With Share Point 2010
Getting Started With Share Point 2010Getting Started With Share Point 2010
Getting Started With Share Point 2010
 
Quickr
QuickrQuickr
Quickr
 
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
A Sneak Peek At Visual Studio 2010 And .Net Framework 4.0
 

Mais de Manfred Steyer

Mais de Manfred Steyer (20)

Der neue Component Router für Angular 2
Der neue Component Router für Angular 2Der neue Component Router für Angular 2
Der neue Component Router für Angular 2
 
Datenbindung und Performance in Angular 2
Datenbindung und Performance in Angular 2Datenbindung und Performance in Angular 2
Datenbindung und Performance in Angular 2
 
Single Page Applications neu gedacht: Redux in Angular 2 mit @ngrx/store
Single Page Applications neu gedacht: Redux in Angular 2 mit @ngrx/storeSingle Page Applications neu gedacht: Redux in Angular 2 mit @ngrx/store
Single Page Applications neu gedacht: Redux in Angular 2 mit @ngrx/store
 
Offlinefähige Browseranwendungen: Progressive Web-Apps mit Angular 2
Offlinefähige Browseranwendungen: Progressive Web-Apps mit Angular 2Offlinefähige Browseranwendungen: Progressive Web-Apps mit Angular 2
Offlinefähige Browseranwendungen: Progressive Web-Apps mit Angular 2
 
Angular 2: Die Ideen hinter Datenbindung und Formularen im Detail betrachtet
Angular 2: Die Ideen hinter Datenbindung und Formularen im Detail betrachtetAngular 2: Die Ideen hinter Datenbindung und Formularen im Detail betrachtet
Angular 2: Die Ideen hinter Datenbindung und Formularen im Detail betrachtet
 
Datengetriebene Web APIs mit Entity Framework
Datengetriebene Web APIs mit Entity FrameworkDatengetriebene Web APIs mit Entity Framework
Datengetriebene Web APIs mit Entity Framework
 
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
Angular 2 Upgrade: Migration von AngularJS 1.x zu 2.0
 
Web APIs mit ASP.NET Core 1
Web APIs mit ASP.NET Core 1Web APIs mit ASP.NET Core 1
Web APIs mit ASP.NET Core 1
 
The newst new Router for Angular 2 ("Version 3")
The newst new Router for Angular 2 ("Version 3")The newst new Router for Angular 2 ("Version 3")
The newst new Router for Angular 2 ("Version 3")
 
Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2Databinding and Performance-Tuning in Angular 2
Databinding and Performance-Tuning in Angular 2
 
Modern authentication solutions in Angular 2 with OAuth 2.0 and OpenId Connect
Modern authentication solutions in Angular 2 with OAuth 2.0 and OpenId ConnectModern authentication solutions in Angular 2 with OAuth 2.0 and OpenId Connect
Modern authentication solutions in Angular 2 with OAuth 2.0 and OpenId Connect
 
Progressive web apps with Angular 2
Progressive web apps with Angular 2Progressive web apps with Angular 2
Progressive web apps with Angular 2
 
Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2
 
Webpack
WebpackWebpack
Webpack
 
ASP.NET Core 1 for MVC- and WebAPI-Devs
ASP.NET Core 1 for MVC- and WebAPI-DevsASP.NET Core 1 for MVC- and WebAPI-Devs
ASP.NET Core 1 for MVC- and WebAPI-Devs
 
Was bringt Angular 2?
Was bringt Angular 2?Was bringt Angular 2?
Was bringt Angular 2?
 
Web APIs mit ASP.NET MVC Core 1
Web APIs mit ASP.NET MVC Core 1Web APIs mit ASP.NET MVC Core 1
Web APIs mit ASP.NET MVC Core 1
 
.NET Summit 2016 München: EcmaScript 2015+ with TypeScript
.NET Summit 2016 München: EcmaScript 2015+ with TypeScript.NET Summit 2016 München: EcmaScript 2015+ with TypeScript
.NET Summit 2016 München: EcmaScript 2015+ with TypeScript
 
.NET Summit 2016 München: Angular 2 mit TypeScript
.NET Summit 2016 München: Angular 2 mit TypeScript.NET Summit 2016 München: Angular 2 mit TypeScript
.NET Summit 2016 München: Angular 2 mit TypeScript
 
Wiederverwendbare Komponenten mit Angular 2.0 – Deep Dive
Wiederverwendbare Komponenten mit Angular 2.0 – Deep DiveWiederverwendbare Komponenten mit Angular 2.0 – Deep Dive
Wiederverwendbare Komponenten mit Angular 2.0 – Deep Dive
 

Último

( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
nilamkumrai
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
nirzagarg
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
@Chandigarh #call #Girls 9053900678 @Call #Girls in @Punjab 9053900678
 

Último (20)

Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Real Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirtReal Men Wear Diapers T Shirts sweatshirt
Real Men Wear Diapers T Shirts sweatshirt
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 

ASP.NET Web API Deep Dive - SSD 2016 London

  • 1. 1 ASP.NET Web API deep dive Manfred Steyer About me … Manfred Steyer Trainer & Consultant Angular & .NET Page  2
  • 2. 2 Goal Show advanced features of ASP.NET Web API Only some Slides Live Coding Folie 4 Contents  Configure Formatters  Binary Serialization  Custom Formatters  Streaming  Versioning  OData with and without EF + restricting it  Metadata via Swagger  Security Folie 5
  • 4. 4 Streaming in IIS (without OWIN) Folie 8 config.Services.Replace( typeof(IHostBufferPolicySelector), new CustomWebHostBufferPolicySelector()); VERSIONING Page  9
  • 5. 5 Two kinds of changes Compatible Changes  Additional optional field etc.  Changes to the minor version, e. g. 1.1 to 1.2 Breaking Change  New Method/ Class  Changes to the major version, e. g. 1.2 to 2.0  Identity by URL or HTTP-Header  api-version: 1.2 Folie 10 DEMO Page  11
  • 6. 6 ODATA Page  12 What is ODATA Standard for "SQL over HTTP" Querying: ?$filter=From eq 'Vienna' Also allows for editing NuGet: Microsoft.AspNet.OData Folie 13
  • 7. 7 SWAGGER Page  14 Swagger Metadata for Web APIs Implementation for .NET: Swashbuckle Every Action-Method has to have its own URL NuGet: Swashbuckle Folie 15
  • 9. 9 HTTP BASIC Transmitting username + password via HTTP-Headers  Base64-encoded: No encryption  Just use with HTTPS IIS checks username + password against Windows/AD OWIN-Middleware to check them by yourself:  Thinktecture.IdentityModel.Owin.BasicAuthentication Folie 18 Tokens Folie 19 Client Authorization-Server Resource-Server 3. Token Central Accounts Auth. decoupled Tokens provide flexibility
  • 10. 10 Solutions for Web APIs Microsoft: Microsoft.Owin.Security.Jwt IdentityServer: IdentityServer3.AccessTokenValidation Folie 20 DEMO Page  21
  • 11. 11 Summary  Formatters for reading and writing Objects  Streaming for performance  Versioning with RouteContraint  OData  Metadata via Swagger and Swashbuckle  Security with HTTP BASIC and Tokens Folie 22 manfred.steyer@SOFTWAREarchitekt.at SOFTWAREarchitekt.at ManfredSteyer Contact