Top "Wcf-web-api" questions

The WCF Web API project allows WCF developers to expose their APIs via HTTP.

Return either xml or json from MVC web api based on request

Given the following webapiconfig; config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = RouteParameter.Optional } ); and this …

c# asp.net-mvc asp.net-web-api asp.net-mvc-routing wcf-web-api
System.Net.Http.HttpClient caching behavior

I'm using HttpClient 0.6.0 from NuGet. I have the following C# code: var client = new HttpClient(new WebRequestHandler() { CachePolicy = new HttpRequestCachePolicy(…

c# wcf couchdb wcf-web-api
how to call cross-domain web api using ajax?

jQuery.ajax({ type: "GET", url: 'http://example.com/restaurant/VeryLogin(username,password)', dataType: "json", success: function (data) { alert(data); }, …

asp.net ajax wcf-web-api
Stubbing or Mocking ASP.NET Web API HttpClient

I am using the new Web API bits in a project, and I have found that I cannot use the …

unit-testing rhino-mocks wcf-web-api
Dependency Injection in WebAPI with Castle Windsor

I want to implement Dependency Injection in WebApi application using Castle Windsor. I have following sample code - Interface - …

c# castle-windsor asp.net-web-api wcf-web-api
Working with System.Threading.Tasks.Task<Stream> instead of Stream

I was using a method like below on the previous versions of WCF Web API: // grab the posted stream Stream …

c# asynchronous wcf-web-api
PostAsync HttpClient error with Web Api - System.AggregateException "A task was canceled."

I'm trying to call PostAsync method using System.Net.Http.HttpClient from the Web API. I get the following error: …

c# asp.net-web-api httpclient wcf-web-api asynchttpclient
Programmatically set InstanceContextMode

Is there a way to do this ... [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] ...programmatically? The reason is that I want to pass …

wcf-web-api
how would one get methods exposed in a webAPI project?

How can I programatically get a list of public methods w/parameters that are exposed in my webAPI project? I …

c# reflection asp.net-web-api wcf-web-api
Web services API Keys and Ajax - Securing the Key

This is probably a generic security question, but I thought I'd ask in the realm of what I'm developing. The …

javascript ajax web-services security wcf-web-api