ASP.NET Web API 2 Recipes provides you with the code to solve a full range of Web API problems and question marks that you might face when developing line-of-business applications. ASP.NET Web API Recipes gives you an in-depth explanation for each of these scenarios and shows you how to use Web API with a vast array of .NET application development tools and external libraries, to solve common business problems. Find out how you can build custom web services with ASP.NET Web API more efficiently than ever. What you’ll learn Build stable, robust ASP.NET Web API solutions on top of the ASP.NET runtime, as well as outside of IIS. Take advantage of HTTP as a true application protocol, by embracing ASP.NET Web API's rich HTTP programming model. Explore the power of the OWIN pipeline. Learn how to customize and configure every aspect of ASP.NET Web API, to suit your business needs and requirements. Benefit from unit testing your Web API services, routing and components, as well as integration testing of the entire Web API solution. Discover the secrets of building loosely coupled, reusable Web API components and extensions. Integrate a realtime component into your Web API. Who this book is for ASP.NET Web API 2 Recipes is for application developers who are creating line-of-business applications using the .NET Framework 4.5, with Visual Studio 2012 or Visual Studio 2013. Experience with ASP.NET Web API is not assumed, but you'll have experience building ASP.NET applications and working with HTTP APIs. Table of Contents Chapter 1: ASP.NET Web API in ASP.NET Chapter 2: Hosting ASP.NET Web API outside of IIS Chapter 3: Routing Chapter 4: Content Negotiation and Media Types Chapter 5: Configuration and Customization Chapter 6: Embracing HTTP with ASP.NET Web API Chapter 7: Exceptions, Troubleshooting and Documenting Chapter 8: Cross Domain and Push Communication Chapter 9: Dependency Injection Chapter 10: Securing an ASP.NET Web API Service Chapter 11: Testing Your ASP.NET Web API Chapter 12: OData __ASP.NET Web API 2 Recipes__ provides you with the code to solve a full range of Web API problems and question marks that you might face when developing line-of-business applications. __ASP.NET Web API Recipes__ gives you an in-depth explanation for each of these scenarios and shows you how to use Web API with a vast array of .NET application development tools and external libraries, to solve common business problems. Find out how you can build custom web services with ASP.NET Web API more efficiently than ever. What you’ll learn* Build stable, robust ASP.NET Web API solutions on top of the ASP.NET runtime, as well as outside of IIS. * Take advantage of HTTP as a true application protocol, by embracing ASP.NET Web API's rich HTTP programming model. * Explore the power of the OWIN pipeline. * Learn how to customize and configure every aspect of ASP.NET Web API, to suit your business needs and requirements. * Benefit from unit testing your Web API services, routing and components, as well as integration testing of the entire Web API solution. * Discover the secrets of building loosely coupled, reusable Web API components and extensions. * Integrate a realtime component into your Web API. Who this book is for __ASP.NET Web API 2 Recipes__ is for application developers who are creating line-of-business applications using the .NET Framework 4.5, with Visual Studio 2012 or Visual Studio 2013. Experience with ASP.NET Web API is not assumed, but you'll have experience building ASP.NET applications and working with HTTP APIs. Table of ContentsChapter 1: ASP.NET Web API in ASP.NET Chapter 2: Hosting ASP.NET Web API outside of IIS Chapter 3: Routing Chapter 4: Content Negotiation and Media Types Chapter 5: Configuration and Customization Chapter 6: Embracing HTTP with ASP.NET Web API Chapter 7: Exceptions, Troubleshooting and Documenting Chapter 8: Cross Domain and Push Communication Chapter 9: Dependency Injection Chapter 10: Securing an ASP.NET Web API Service Chapter 11: Testing Your ASP.NET Web API Chapter 12: OData 1-7. Use CSRF ProtectionProblem; Solution; How It Works; The Code; 1-8. Add Support for Session State; Problem; Solution; How It Works; The Code; Chapter 2: ASP.NET Web API Outside of IIS; 2-1. Self-Host ASP.NET Web API; Problem; Solution; How It Works; The Code; 2-2. Host ASP.NET Web API with OWIN; Problem; Solution; How It Works; The Code; 2-3. Host ASP.NET Web API in Azure Mobile Services; Problem; Solution; How It Works; The Code; 2-4. Quick Prototypes with scriptcs; Problem; Solution; How It Works; The Code; 2-5. Host ASP.NET Web API in Azure Worker Role; Problem; Solution; How It Works The Code2-6. Use ASP.NET Web API with F♯; Problem; Solution; How It Works; The Code; Chapter 3: Routing; 3-1. Define Centralized Routes; Problem; Solution; How It Works; The Code; 3-2. Define Direct Routes; Problem; Solution; How It Works; The Code; 3-3. Set Default Route Values; Problem; Solution; How It Works; The Code; 3-4. Set Optional Route Values; Problem; Solution; How It Works; The Code; 3-5. Set Route Constraints; Problem; Solution; How It Works; The Code; 3-6. Define Remote Procedure Call Style Routes; Problem; Solution; How It Works; The Code; 3-7. Create Catch-all Routes; Problem SolutionHow It Works; The Code; 3-8. Prevent Controller Methods from Inadvertently Becoming Web API Endpoints; Problem; Solution; How It Works; Solution; 3-9. Configure Route-Specific Message Handlers; Problem; Solution; How It Works; The Code; 3-10. Ignore Routes; Problem; Solution; How It Works; The Code; 3-11. Localize Routes; Problem; Solution; How It Works; The Code; 3-12. Generate a Link to the Route; Problem; Solution; How It Works; The Code; Chapter 4: Content Negotiation and Media Types; 4-1. Request a Specific Media Type from ASP.NET Web API; Problem; Solution; How It Works The Code4-2. Support Additional Media Types; Problem; Solution; How It Works; The Code; 4-3. Control Model Binding From URI and Body; Problem; Solution; How It Works; The Code; FromUri and FromBody; TypeConverters; ModelBinders; 4-4. ASP.NET MVC-style Parameter Bindingin ASP.NET Web API; Problem; Solution; How It Works; The Code; 4-5. Customize XML and JSON Responses; Problem; Solution; How It Works; The Code; JSON; XML; 4-6. Write Your Own MediaTypeFormatter; Problem; Solution; How It Works; The Code; 4-7. Run Content Negotiation Manually; Problem; Solution; How It Works; The Code ASP.NET Web API 2 Recipes provides you with the code to solve a full range of Web API problems and question marks that you might face when developing line-of-business applications. ASP.NET Web API 2 Recipes gives you an in-depth explanation for each of these scenarios and shows you how to use Web API with a vast array of .NET application development tools and external libraries, to solve common business problems. Find out how you can build custom web services with ASP.NET Web API more efficiently than ever. Filip Wojcieszyn. Place Of Publication From Publisher's Website. Includes Index.