Questions tagged [wcf-web-api]

The WCF Web API project allows WCF developers to expose their APIs via HTTP. Under ASP.NET MVC4, WCF Web API has become ASP.NET Web API.

The WCF Web API project focuses on allowing WCF developers to expose their APIs for programmatic access over HTTP by browsers and devices. With the release of ASP.NET MVC4, WCF Web API is now ASP.NET Web API.

Project Links:

269 questions
9
votes
4 answers

How do I configure the buffer size and max message size in the ASP.NET Web API

We used to have these properties in the WCF Web API configuration. MaxBufferSize = int.MaxValue, MaxReceivedMessageSize = int.MaxValue,
suing
  • 2,808
  • 2
  • 16
  • 18
9
votes
2 answers

How do I return raw html from a WCF WebAPI WebGet

I have a self-hosted WCF service running as a windows service using the WebAPI to handle the REST stuff and it works great. I realise that I should really use IIS or similar to dish out actual web pages, but is there ANY way to get a service call to…
Swordblaster
  • 356
  • 2
  • 7
9
votes
3 answers

Ninject working with WCF Web API Preview 5

Can anybody point me in the right direction to get Ninject working with WCF Web API Preview 5? I have it successfully up and running in my ASP.NET MVC 3 project and also in another internal WCF Service using the Ninject.Extensions.Wcf library.…
Cragly
  • 3,554
  • 9
  • 45
  • 59
8
votes
1 answer

JSON.NET Serializer for WCF REST Services

I am trying to use the NETFx Json.NET MediaTypeFormatter nuget package to swap out the default DataContractJsonSerializer in my WCF REST service (4.0 framework). I downloaded the package in my project and added the following lines of code in the…
muruge
  • 4,083
  • 3
  • 38
  • 45
8
votes
1 answer

MVC4 WebAPI Reason Phrase?

According to the HttpResponseMessage documentation on MSDN, the reason phrase (as in, the "OK" part of 200 OK) should be settable. The HTTP response does let me set the reason phrase: HttpResponseMessage response = new…
Ross
  • 2,448
  • 1
  • 21
  • 24
8
votes
2 answers

WebApi HttpClient for .NET framework 3.5

Is there any package available of WebApi for .Net framework 3.5? I'm specifically looking forward to use HttpClient component of WebApi. Is there any alternatives that work on .Net 3.5?
Raj
  • 4,405
  • 13
  • 59
  • 74
8
votes
1 answer

Can I run an MVC app and WCF Web Api on the same AppHarbor site?

We have a solution with this structure. OurApp.Web (mvc 3 project with controllers, views) OurApp.Api (mvc 3 project with wcf web api service classes) OurApp.Domain (entities, repositories, unit of work, etc) OurApp.Tests (tests) We want to use a…
nacho10f
  • 5,816
  • 6
  • 42
  • 73
8
votes
1 answer

Hosting a WCF Web API app on AppHarbor?

I've implemented a sample app like the one here. It is a really basic app just to get things started. Everything works fine in IIS on my local machine, I've got it running on my IIS Express as well, but now come the tricky part. I do want to host…
Tomas Jansson
  • 22,767
  • 13
  • 83
  • 137
7
votes
1 answer

What is the equivalent of HttpServiceHost in ASP.NET WebAPI?

I wanted to try out this example of a self-hosted webservice (originally written in WCF WebApi), but using the new ASP.NET WebAPI (which is the descendant of WCF WebApi). using System; using System.Net.Http; using System.ServiceModel; using…
Benjol
  • 63,995
  • 54
  • 186
  • 268
7
votes
3 answers

Error with a file upload WCF WEB API (Preview 6) : Cannot write more bytes to the buffer than the configured maximum buffer size: 65536

I'm having a real problem with the WCF web api. I have a simple method that uploads a file and saves to disk. I seem to have set all the right params, but get the above error message when I try to upload a 2mb file. Server Code: public static void…
Dave Stringer
  • 349
  • 4
  • 15
7
votes
3 answers

What is better for REST API? WCF Web API (Preview 4) or OpenRasta or something else?

I see in this question that WCF Web API is still in preview and I've just started looking at OpenRasta. Though OpenRasta looks more mature than WCF Web API, I'm still a bit confused. Or please suggest if there is any other better framework for…
IsmailS
  • 10,797
  • 21
  • 82
  • 134
7
votes
1 answer

Setting up Ninject with the new WCF Web API

So I've been playing around with the latest release of the WCF Web API and decided I wanted to dive into implementing Ninject with it. Based off what I've read I need to implement the interface IResourceFactory which demands the following methods: …
Khepri
  • 9,547
  • 5
  • 45
  • 61
7
votes
4 answers

ASP.NET MVC API or WCF API

I'm developing an ASP.NET MVC 3 application. I need this application to make use of an API I also need to implement. The API should both be available from ASP.NET MVC controller actions and Ajax. Now it is quite easy to make an API using ASP.NET…
Rasmus Christensen
  • 8,321
  • 12
  • 51
  • 78
7
votes
3 answers

ASP.NET WebApi SelfHost service fails on HTTP URL registration

I am trying to host an ASP.NET WebApi endpoint on an Azure worker role using the new Microsoft.AspNet.WebApi.SelfHost NuGet package. My worker's Run() code looks roughly like this: // Endpoint is defined as in ServiceDefinition.csdef as // HTTP,…
Omri Gazitt
  • 3,428
  • 2
  • 21
  • 27
6
votes
4 answers

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); }, error:…
tiru
  • 789
  • 5
  • 20
  • 42
1 2
3
17 18