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
2
votes
0 answers

Updating foreign key entities in Entity Framework 4.1

I'm currently building a REST service using WebApi and the backing store is using EF4.1. I've run into a snag whereby I cannot update the foreign key... The 2 model classes look like: public class User { [Key] public int UserId { get; set;…
Matthew Merryfull
  • 1,466
  • 18
  • 32
2
votes
1 answer

How to define configs multiple endpoints for a WCF self-hosted service?

I have two WCF Web API Contracts. Before this, I was happy that I could use TestClient. But after I implemented the second one I had to define endpoints (and could not use the default one) and after that, either I see nothing in browser or this…
Pouya BCD
  • 991
  • 4
  • 11
  • 23
2
votes
1 answer

WCF Web API DateTimeOffset Problems

I am using WCF Web API Preview 6 with its inbuilt Test Client to request a resource by Id. The object returns with all its data except for the ‘CreateDate’ and ‘LastModifiedDate’ properties which are of type DateTimeOffset and are empty. I have…
Cragly
  • 3,554
  • 9
  • 45
  • 59
2
votes
1 answer

WCF Web API preview 6: No 'MediaTypeFormatter' is available

I'm looking at using HttpClient in WCF Web API Preview 6 to consume a third party service. This third party service accepts and returns XML formatted data. Their HTTP responses have the Content-Type header set to text/plain. It appears that…
chris.house.00
  • 3,273
  • 1
  • 27
  • 36
2
votes
1 answer

Where can I find up-to-date documentation about the WCF Web API?

I've been strugling with WCF to do REST the way I want it to work. And apparently so has quite a few others. I've heard about the WCF Web Api project, but wrongly dismissed it without looking too closely at it. Sadly, now that I'm looking at it I…
Gaute Løken
  • 7,522
  • 3
  • 20
  • 38
2
votes
1 answer

Reading content to the memory from the multi-part file upload

I have a problem reading uploaded XML file to the string instead of file. My problem is that when I try to access the stream (var stream = part.ContentReadStream) then it's closed. I have feeling that it is accessing closed file stream. Am I using…
Tx3
  • 6,796
  • 4
  • 37
  • 52
2
votes
1 answer

setting a proxy on HttpClient that comes with WCF Web Api?

Does anyone know of a way to set a proxy on httpclient that comes with the wcf web api? I just want to be able to monitor all the traffic with fiddler.
coding4fun
  • 8,038
  • 13
  • 58
  • 85
2
votes
2 answers

Is the WCF Web.API safe for production applications?

The WCF Web.API hasn't been incorporated into the .NET Framework as of the date of this post. Is it safe to use this library in production code or is it's only usefulness for testing at the moment ?
BentOnCoding
  • 27,307
  • 14
  • 64
  • 92
2
votes
4 answers

What framework should I choose to build a WCF Restful API

I am wanting to build a Restful API using WCF however I am struggling to make a decision on how to accomplish this. The WCF Rest Starter Kit was developed for .Net 3.5 and has not progressed past Preview 2. Although it can be used within the current…
Cragly
  • 3,554
  • 9
  • 45
  • 59
2
votes
3 answers

Setting Maximum Size For ObjectContent Web API Preview 5

When I use the the ObjectContent object to create the HttpContent to send a request via HttpClient to a Web API service I am getting the following error: Cannot write more bytes to the buffer than the configured maximum buffer size: 65536 The…
Dean
  • 1,550
  • 2
  • 15
  • 22
2
votes
2 answers

Massive with WCF Web Api to return dynamic types/Expandos?

I want to use Massive for data access with WCF Web Api and return either dynamic or ExpandoObject / IEnumerable from my web api. I have this basically working using a JsonNetMediaTypeFormatter which uses Json.NET's ExpandoObject…
anderly
  • 727
  • 7
  • 16
2
votes
1 answer

BackgroundTransferRequest WP7

I am using the Background Transfer to upload Photographs to my Web Service. As the Photograph uploads can consume significant time and memory, I thought it might be a nice idea to use the background transfer request to accomplish this. After the…
Anup Marwadi
  • 2,517
  • 4
  • 25
  • 42
2
votes
3 answers

Protecting my REST service, which I will use on the client side, from others to use

Let's assume that I have created my REST service smoothly and I am returning json results. I also implemented API key for my users to communicate for my service. Then Company A started using my service and I gave them an API key. Then they created…
tugberk
  • 57,477
  • 67
  • 243
  • 335
2
votes
1 answer

Returning a 401 Unauthorized from WCF Web API in an MVC 3 App

I'm using the WCF Web API (the latest version, which I think is 0.5, obtained from the VS2010 Ultimate integrated package dependency GUI). I've got a simple API class exposed and in each method I'm making a call that performs authorization against…
Kevin Hoffman
  • 5,154
  • 4
  • 31
  • 33
2
votes
2 answers

If I want to do REST in an IIS, should I go for WCF Web Api already NOW?

I need to create a REST API that runs on IIS and played with WCF Web Api. It seems to be able to do everything I want, in contrast to plain WCF or the now deprecated WCF starter kit. I haven't really tried those, but conneg seems to be hard or…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156