AspNetCore.Docs/aspnet/web-api/index.md

148 lines
12 KiB
Markdown
Raw Normal View History

merge aspnetmigration to master (#2668) * Initial aspnet migration * Updating legacy urls * Clearing .gitignore file Clearing .gitignore file because this isnt a normal .net application where we want to strip away debug files, etc. We want to include everything under these folders. * Updating webhooks toc reference * Removing header debug links * Updating webhooks toc * Updating double quotes in metadata to use single quotes * Moving all code blocks to external files * Updating newlines for step-by-step * Fixing indent problem on some code blocks * Fixing newlines in alt attribute for images; Fixing some missing code block references * Resyncing with live content * Refreshing content from production * Trying to get pdf to generate for our aspnetmigration branch * Update .openpublishing.publish.config.json * Refresh from prod; Removing some legacy urls for pages that shouldnt have it * Updating index pages and removing legacy urls * Updating warning and caution notes * Removing downloads * remove aspnet from exclude list (#2549) * First pass at language detection * Updating author and adding in msc.type * Updating code blocks * Updating note styles * Fixing note styles * Updating docfx.json file to allow pdfs and gifs * Fixing note stylings for bold notes * Updating docfx.json to allow exe, zip and wmv files * Fixing note styles with period; Fixing downloads links * Fixing code blocks for razor cs and vb * Fixing more downloads links; Fixing a few code blocks * Removing   html entity * Fixing some more note stylings * Syncing with prod * Fixing issues with content * Rebuilding toc file * Adding back in files accidentally deleted * Fixing some security notes * Fixing some note styles * Updating unknown code blocks * Updating article * Fixing link * Fixing link * Fixing link * Fixing invalid characters * preliminary toc changes * update toc * fix toc folder with only one link * Fixing extra heading * Fixing articles * Reworking ajax pages * Fixing encoding issues * Updating markup in articles * Fixing space * Fixing spacing issues with links * Fixing note styles * Fixing inline note styles * Fixing missing image * Adding space * Rolling back gitignore file and adding a new one for /aspnet * Fixing some code blocks * Updating code block language * Renaming file * Updating code language * Fixing code blocks * Fixing code blocks * Fixing spaces before 'using' * Fixing cs to js * Changing Note type * Updating broken reference * Replacing headings with bolds under notes/tips, etc * Fixing markdown for pipes * Another attempted to fix pipe characters * Fixing markdown for pipes * remove text about being thread-safe (#2630) * Fixing spacing issue with list * Trying to fix pipe issue * new how to choose doc * move choose doc to core folder * add api ref * fix link * Adding in ms.assetid * Removing \ufeff * fix link * link to mvc intro instead of webhooks * add scenarios * put core first, vertical orientation for scenarios * reorganize toc, make overview work like core version * fix yaml * fix broken links * Adding space * add download link * tweak tables * eliminate images * eliminate images 2 * tweak scenario section headings * add link to core in asp.net overview * Removing gears * Updating table * Updating code block languages * fix urls (#2663) * Removing embedded in-article TOC from top of articles * fix urls (#2666) * fix urls * fix urls * Removing embedded in-article TOC from top of articles * Revert "Removing embedded in-article TOC from top of articles" This reverts commit ff1c3ccdf1cf2d705e0bb040144a10fa130796f6. * Revert "Removing embedded in-article TOC from top of articles" This reverts commit 17c37c726d930ec6854b545bab076dffda486ebe.
2017-02-04 05:40:22 +08:00
---
uid: web-api/index
merge aspnetmigration to master (#2668) * Initial aspnet migration * Updating legacy urls * Clearing .gitignore file Clearing .gitignore file because this isnt a normal .net application where we want to strip away debug files, etc. We want to include everything under these folders. * Updating webhooks toc reference * Removing header debug links * Updating webhooks toc * Updating double quotes in metadata to use single quotes * Moving all code blocks to external files * Updating newlines for step-by-step * Fixing indent problem on some code blocks * Fixing newlines in alt attribute for images; Fixing some missing code block references * Resyncing with live content * Refreshing content from production * Trying to get pdf to generate for our aspnetmigration branch * Update .openpublishing.publish.config.json * Refresh from prod; Removing some legacy urls for pages that shouldnt have it * Updating index pages and removing legacy urls * Updating warning and caution notes * Removing downloads * remove aspnet from exclude list (#2549) * First pass at language detection * Updating author and adding in msc.type * Updating code blocks * Updating note styles * Fixing note styles * Updating docfx.json file to allow pdfs and gifs * Fixing note stylings for bold notes * Updating docfx.json to allow exe, zip and wmv files * Fixing note styles with period; Fixing downloads links * Fixing code blocks for razor cs and vb * Fixing more downloads links; Fixing a few code blocks * Removing   html entity * Fixing some more note stylings * Syncing with prod * Fixing issues with content * Rebuilding toc file * Adding back in files accidentally deleted * Fixing some security notes * Fixing some note styles * Updating unknown code blocks * Updating article * Fixing link * Fixing link * Fixing link * Fixing invalid characters * preliminary toc changes * update toc * fix toc folder with only one link * Fixing extra heading * Fixing articles * Reworking ajax pages * Fixing encoding issues * Updating markup in articles * Fixing space * Fixing spacing issues with links * Fixing note styles * Fixing inline note styles * Fixing missing image * Adding space * Rolling back gitignore file and adding a new one for /aspnet * Fixing some code blocks * Updating code block language * Renaming file * Updating code language * Fixing code blocks * Fixing code blocks * Fixing spaces before 'using' * Fixing cs to js * Changing Note type * Updating broken reference * Replacing headings with bolds under notes/tips, etc * Fixing markdown for pipes * Another attempted to fix pipe characters * Fixing markdown for pipes * remove text about being thread-safe (#2630) * Fixing spacing issue with list * Trying to fix pipe issue * new how to choose doc * move choose doc to core folder * add api ref * fix link * Adding in ms.assetid * Removing \ufeff * fix link * link to mvc intro instead of webhooks * add scenarios * put core first, vertical orientation for scenarios * reorganize toc, make overview work like core version * fix yaml * fix broken links * Adding space * add download link * tweak tables * eliminate images * eliminate images 2 * tweak scenario section headings * add link to core in asp.net overview * Removing gears * Updating table * Updating code block languages * fix urls (#2663) * Removing embedded in-article TOC from top of articles * fix urls (#2666) * fix urls * fix urls * Removing embedded in-article TOC from top of articles * Revert "Removing embedded in-article TOC from top of articles" This reverts commit ff1c3ccdf1cf2d705e0bb040144a10fa130796f6. * Revert "Removing embedded in-article TOC from top of articles" This reverts commit 17c37c726d930ec6854b545bab076dffda486ebe.
2017-02-04 05:40:22 +08:00
title: "ASP.NET Web API | Microsoft Docs"
author: rick-anderson
description: "Download ASP.NET MVC 4 and build HTTP services that reach a broad range of clients."
ms.author: aspnetcontent
manager: wpickett
ms.date: 01/17/2012
ms.topic: article
ms.assetid: f571ca7a-c06b-400d-8051-f62f9f0bcc9b
ms.technology: dotnet-webapi
ms.prod: .net-framework
msc.legacyurl: /web-api
msc.type: categoryindex
---
ASP.NET Web API
====================
- [Guidance](overview/index.md)
- [Getting Started](overview/getting-started-with-aspnet-web-api/index.md)
- [Getting Started with Web API 2 (C#)](overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api.md)
- [Action Results in Web API 2](overview/getting-started-with-aspnet-web-api/action-results.md)
- [Using Web API with ASP.NET Web Forms](overview/getting-started-with-aspnet-web-api/using-web-api-with-aspnet-web-forms.md)
- [Creating Web API Help Pages](overview/getting-started-with-aspnet-web-api/creating-api-help-pages.md)
- [Hands On Lab: Build a Single Page Application (SPA) with ASP.NET Web API and Angular.js](overview/getting-started-with-aspnet-web-api/build-a-single-page-application-spa-with-aspnet-web-api-and-angularjs.md)
- [Routing](overview/web-api-routing-and-actions/index.md)
- [Routing in Web API](overview/web-api-routing-and-actions/routing-in-aspnet-web-api.md)
- [Routing and Action Selection in Web API](overview/web-api-routing-and-actions/routing-and-action-selection.md)
- [Attribute Routing in Web API 2](overview/web-api-routing-and-actions/attribute-routing-in-web-api-2.md)
- [Create a REST API with Attribute Routing in Web API 2](overview/web-api-routing-and-actions/create-a-rest-api-with-attribute-routing.md)
- [Working with Data](overview/data/index.md)
- [Using Web API 2 with Entity Framework 6](overview/data/using-web-api-with-entity-framework/index.md)
- [Create the Project](overview/data/using-web-api-with-entity-framework/part-1.md)
- [Add Models and Controllers](overview/data/using-web-api-with-entity-framework/part-2.md)
- [Seed the Database](overview/data/using-web-api-with-entity-framework/part-3.md)
- [Handling Entity Relations](overview/data/using-web-api-with-entity-framework/part-4.md)
- [Create Data Transfer Objects (DTOs)](overview/data/using-web-api-with-entity-framework/part-5.md)
- [Create the JavaScript Client](overview/data/using-web-api-with-entity-framework/part-6.md)
- [Create the View (UI)](overview/data/using-web-api-with-entity-framework/part-7.md)
- [Display Item Details](overview/data/using-web-api-with-entity-framework/part-8.md)
- [Add a New Item to the Database](overview/data/using-web-api-with-entity-framework/part-9.md)
- [Publish the App to Azure Websites](overview/data/using-web-api-with-entity-framework/part-10.md)
- [Mobile Clients](overview/mobile-clients/index.md)
- [Calling Web API from a Windows Phone 8 Application (C#)](overview/mobile-clients/calling-web-api-from-a-windows-phone-8-application.md)
- [OData](overview/odata-support-in-aspnet-web-api/index.md)
- [OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/index.md)
- [Create an OData v4 Endpoint](overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-endpoint.md)
- [Create an OData v4 Client App (C#)](overview/odata-support-in-aspnet-web-api/odata-v4/create-an-odata-v4-client-app.md)
- [Entity Relations in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/entity-relations-in-odata-v4.md)
- [Actions and Functions in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/odata-actions-and-functions.md)
- [Containment in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/odata-containment-in-web-api-22.md)
- [Create a Singleton in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/using-a-singleton-in-an-odata-endpoint-in-web-api-22.md)
- [Open Types in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/use-open-types-in-odata-v4.md)
- [Complex Type Inheritance in OData v4](overview/odata-support-in-aspnet-web-api/odata-v4/complex-type-inheritance-in-odata-v4.md)
- [OData v3](overview/odata-support-in-aspnet-web-api/odata-v3/index.md)
- [Creating an OData v3 Endpoint](overview/odata-support-in-aspnet-web-api/odata-v3/creating-an-odata-endpoint.md)
- [Supporting Entity Relations in OData v3](overview/odata-support-in-aspnet-web-api/odata-v3/working-with-entity-relations.md)
- [OData Actions in Web API 2](overview/odata-support-in-aspnet-web-api/odata-v3/odata-actions.md)
- [Calling an OData Service From a .NET Client (C#)](overview/odata-support-in-aspnet-web-api/odata-v3/calling-an-odata-service-from-a-net-client.md)
- [Supporting OData Query Options in Web API 2](overview/odata-support-in-aspnet-web-api/supporting-odata-query-options.md)
- [Using $select, $expand, and $value in Web API 2 OData](overview/odata-support-in-aspnet-web-api/using-select-expand-and-value.md)
- [Routing Conventions in Web API 2 OData](overview/odata-support-in-aspnet-web-api/odata-routing-conventions.md)
- [Security Guidance for Web API 2 OData](overview/odata-support-in-aspnet-web-api/odata-security-guidance.md)
- [Serialization and Model Binding](overview/formats-and-model-binding/index.md)
- [Media Formatters in Web API 2](overview/formats-and-model-binding/media-formatters.md)
- [JSON and XML Serialization in Web API](overview/formats-and-model-binding/json-and-xml-serialization.md)
- [BSON Support in Web API 2.1](overview/formats-and-model-binding/bson-support-in-web-api-21.md)
- [Content Negotiation in Web API](overview/formats-and-model-binding/content-negotiation.md)
- [Model Validation in Web API](overview/formats-and-model-binding/model-validation-in-aspnet-web-api.md)
- [Parameter Binding in Web API](overview/formats-and-model-binding/parameter-binding-in-aspnet-web-api.md)
- [Error Handling](overview/error-handling/index.md)
- [Exception Handling in Web API](overview/error-handling/exception-handling.md)
- [Global Error Handling in Web API 2](overview/error-handling/web-api-global-error-handling.md)
- [Testing and Debugging](overview/testing-and-debugging/index.md)
- [Tracing in Web API 2](overview/testing-and-debugging/tracing-in-aspnet-web-api.md)
- [Unit Testing Web API 2](overview/testing-and-debugging/unit-testing-with-aspnet-web-api.md)
- [Unit Testing Controllers in ASP.NET Web API 2](overview/testing-and-debugging/unit-testing-controllers-in-web-api.md)
- [Mocking Entity Framework when Unit Testing Web API 2](overview/testing-and-debugging/mocking-entity-framework-when-unit-testing-aspnet-web-api-2.md)
- [Troubleshooting HTTP 405 Errors after Publishing Web API 2 Applications](overview/testing-and-debugging/troubleshooting-http-405-errors-after-publishing-web-api-applications.md)
- [Security, Authentication, and Authorization](overview/security/index.md)
- [Authentication and Authorization in Web API](overview/security/authentication-and-authorization-in-aspnet-web-api.md)
- [Secure a Web API with Individual Accounts in Web API 2.2](overview/security/individual-accounts-in-web-api.md)
- [External Authentication Services with Web API (C#)](overview/security/external-authentication-services.md)
- [Preventing Cross-Site Request Forgery (CSRF) Attacks in Web API](overview/security/preventing-cross-site-request-forgery-csrf-attacks.md)
- [Enabling Cross-Origin Requests in Web API 2](overview/security/enabling-cross-origin-requests-in-web-api.md)
- [Authentication Filters in Web API 2](overview/security/authentication-filters.md)
- [Basic Authentication in Web API](overview/security/basic-authentication.md)
- [Forms Authentication in Web API](overview/security/forms-authentication.md)
- [Integrated Windows Authentication](overview/security/integrated-windows-authentication.md)
- [Working with SSL](overview/security/working-with-ssl-in-web-api.md)
- [Deployment and Hosting](overview/hosting-aspnet-web-api/index.md)
- [Use OWIN to Self-Host Web API 2](overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api.md)
- [Host Web API 2 in an Azure Worker Role](overview/hosting-aspnet-web-api/host-aspnet-web-api-in-an-azure-worker-role.md)
- [Advanced Topics](overview/advanced/index.md)
- [Configuring Web API 2](overview/advanced/configuring-aspnet-web-api.md)
- [Dependency Injection in Web API 2](overview/advanced/dependency-injection.md)
- [Calling a Web API From a .NET Client (C#)](overview/advanced/calling-a-web-api-from-a-net-client.md)
- [HTTP Message Handlers in Web API](overview/advanced/http-message-handlers.md)
- [HttpClient Message Handlers in Web API](overview/advanced/httpclient-message-handlers.md)
- [Sending HTML Form Data in Web API: Form-urlencoded Data](overview/advanced/sending-html-form-data-part-1.md)
- [Sending HTML Form Data in Web API: File Upload and Multipart MIME](overview/advanced/sending-html-form-data-part-2.md)
- [HTTP Cookies in ASP.NET Web API](overview/advanced/http-cookies.md)
- [Releases](overview/releases/index.md)
- [What's New in Web API OData 5.3](overview/releases/whats-new-in-aspnet-web-api-odata-53.md)
- [What's New in ASP.NET Web API 2.2](overview/releases/whats-new-in-aspnet-web-api-22.md)
- [What's New in ASP.NET Web API 2.1](overview/releases/whats-new-in-aspnet-web-api-21.md)
- [Older Versions](overview/older-versions/index.md)
- [Enabling CRUD Operations in Web API 1](overview/older-versions/creating-a-web-api-that-supports-crud-operations.md)
- [Using ASP.NET Web API 1 with Entity Framework 5](overview/older-versions/using-web-api-1-with-entity-framework-5/index.md)
- [Overview and Creating the Project](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-1.md)
- [Creating the Domain Models](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-2.md)
- [Creating an Admin Controller](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-3.md)
- [Adding an Admin View](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-4.md)
- [Creating a Dynamic UI with Knockout.js](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-5.md)
- [Creating Product and Order Controllers](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-6.md)
- [Creating the Main Page](overview/older-versions/using-web-api-1-with-entity-framework-5/using-web-api-with-entity-framework-part-7.md)
- [Self-Host Web API 1 (C#)](overview/older-versions/self-host-a-web-api.md)
- [Build RESTful API's with ASP.NET Web API](overview/older-versions/build-restful-apis-with-aspnet-web-api.md)
- [Videos](videos/index.md)
- [Overview and Getting Started](videos/getting-started/index.md)
- [ASP.NET Web API](videos/getting-started/aspnet-web-api.md)
- [ASP.NET Web API, Part 1: Your First Web API](videos/getting-started/your-first-web-api.md)
- [ASP.NET Web API, Part 2: Getting Data](videos/getting-started/getting-data.md)
- [ASP.NET Web API, Part 3: Delete and Update](videos/getting-started/delete-and-update.md)
- [ASP.NET Web API, Part 4: Paging and Querying](videos/getting-started/paging-and-querying.md)
- [ASP.NET Web API, Part 5: Custom Validation](videos/getting-started/custom-validation.md)
- [ASP.NET Web API, Part 6: Authorization](videos/getting-started/authorization.md)
2017-09-20 15:36:55 +08:00
- [Web API Samples List](samples-list.md)