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
4
votes
1 answer

Integrating DotNetOpenAuth and WCF WebAPI

I am trying to create a RESTful web service based on WCF Web API. I also need to control access using OAuth and for this I am using the DotNetOpenAuth open source library. Has anyone ever been successful integrating the two? I am struggling…
Stefano Ricciardi
  • 2,923
  • 3
  • 33
  • 40
4
votes
2 answers

This method or property is not supported after HttpRequest.GetBufferlessInputStream has been invoked

I am trying to browse and upload a file from client to server using Angular Js and WEB API.I used Input file type for user to select file and post the file to WEB API. In web API, I am getting following error "This method or property is not…
Hem
  • 91
  • 1
  • 12
4
votes
2 answers

How do you return a custom 503 message?

I have a service implemented in MVC4 / ASP.NET Web Api. I would like to return a custom 503 message to my clients when the system is down for maintenance. I have the following code: public class ServiceController : ApiController { …
4
votes
1 answer

How do I handle JSONP with WebAPI?

Possible Duplicate: JSONP with MVC 4 WebApi I have a get method for my WebAPI which is as follows: private T Get(string uri) { T result = default(T); bool isSuccess = true; client .GetAsync(uri) …
phoenix
  • 103
  • 2
  • 6
3
votes
1 answer

Where'd the TestClient go?

Where did the auto-generated test client go in ASP.NET Web API? (part of MVC 4 beta) In the WCF WebAPI it was in the global.asax: var config = new HttpConfiguration() { EnableTestClient = true, EnableHelpPage=true…
Eric Falsken
  • 4,796
  • 3
  • 28
  • 46
3
votes
2 answers

ASP.Net Web API vs WCF - Can the Web API be used to provide REST-based communication to a singleton WCF service?

I have an existing set of singleton WCF services. They are long-running processes that do a lot of work on an ongoing basis and expose themselves with WCF service contracts for communication with other processes. When the WCF Web API was being…
Nathan Ridley
  • 33,766
  • 35
  • 123
  • 197
3
votes
1 answer

WCF WebApi HttpResponseException Issue

I am trying to throw an HttpResponseException(HttpStatusCode.NotFound) and I am getting the following error The response message returned by the Response property of this exception should be immediately returned to the client. No further handling…
Stuart
  • 201
  • 1
  • 11
3
votes
1 answer

ASP.NET Web API binding method

I have two methods like this public class ProductController : ApiController { public Product GetProductById(int id) { var product = ... //get product return product; } public Product GetProduct(int id) { …
dohaivu
  • 2,038
  • 15
  • 17
3
votes
2 answers

Async REST Services using WCF WebApi

I want to know what is the opinion of you fellow Developers regarding WCF WebApi services. In an N-tier application we can have multiple layers of services. We can have services consuming data from external services. In that scenario its worth to…
coddey
  • 390
  • 2
  • 13
3
votes
2 answers

OAuth 2.0 provider in ASP.NET MVC

Does someone knows OAuth 2.0 provider (server) written in ASP.NET MVC ?
Radenko Zec
  • 7,659
  • 6
  • 35
  • 39
3
votes
4 answers

Implementing a Unit Of Work with WCF WebApi

One of the challenges I'm facing with the new WCF WebApi is that I cannot cleanly implement a UnitOfWork pattern. As a quick background, the pattern works by starting a unit-of-work at the beginning of the request, doing some work, and then…
Joseph Daigle
  • 47,650
  • 10
  • 49
  • 73
3
votes
5 answers

MachineKey Azure SDK 1.5/1.6

I am using a custom Api Token implementation using WCF Web API on Azure. This uses FormsAuthentication.Decrypt in order to obtain a FormsAuthenticationTicket. To make sure that the decrpyt process works across multiple instances, I have provided a…
Anup Marwadi
  • 2,517
  • 4
  • 25
  • 42
3
votes
2 answers

WCF WebAPI client does not know about server types

I am following along in the .6 release of the WCF Web API chm file. I have built my service and everything works fine when I access it via IE. But when I create my console app, I don't understand how the client can know about the "contact" type. …
Terrence
  • 313
  • 2
  • 12
3
votes
2 answers

Consuming WebApi in MVC3

Using WebApi, what is the best way to consume a service in a MVC client? If the response comes back as:
Richard
  • 5,810
  • 6
  • 29
  • 36
3
votes
1 answer

How to communicate WCF exceptions to WebClient

I have a WCF web service which throws exceptions when invalid data is submitted. The data is submitted via an HTTP Post using the WebClient object. Here is the code for the web service: [WebInvoke(UriTemplate = "update", Method = "POST")] public…
Alfero Chingono
  • 2,663
  • 3
  • 33
  • 54