Enabling Cross-Origin Requests in ASP.NET Web API 2

Introduction This tutorial demonstrates CORS support in ASP.NET Web API. We’ll start by creating two ASP.NET projects – one called “WebService”, which hosts a Web API controller, and the other called “WebClient”, which calls WebService. Because the two applications are hosted at different domains, an AJAX request from WebClient to WebService is a cross-origin request…

Read More

owin security in web api

In Visual Studio 2013, the Web API project template gives you three options for authentication: Individual accounts. The app uses a membership database. Organizational accounts. Users sign in with their Azure Active Directory, Office 365, or on-premise Active Directory credentials. Windows authentication. This option is intended for Intranet applications, and uses the Windows Authentication IIS…

Read More

Parameter Binding in ASP.NET Web API

When Web API calls a method on a controller, it must set values for the parameters, a process called binding. This article describes how Web API binds parameters, and how you can customize the binding process. By default, Web API uses the following rules to bind parameters: If the parameter is a “simple” type, Web…

Read More

Wcf Vs Web Api

he following table describes the major features of each technology. WCF ASP.NET Web API Enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them. HTTP only. First-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc enabling wide reach. Enables building services…

Read More