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

WCF Web API - Model Binding to an object (Ensure that a request HttpOperationHandler has an output parameter with a type assignable to...)

On WCF Web API Preview 5, I am dealing with a strange behavior. Here is the scenario: This is my model: public class Person { public int ID { get; set; } public string Name { get; set; } public string Surname { get; set; } public int…
tugberk
  • 57,477
  • 67
  • 243
  • 335
0
votes
2 answers

Prevent Application changes breaking API

I have an application which I am currently writing an API. This is the first time I have created an API from start to finish and have read lots of good articles and how to do this. However a lot of that material focuses on the API development…
Cragly
  • 3,554
  • 9
  • 45
  • 59
0
votes
2 answers

Receiving 404 error from WCF Web API (Put operation)

I created a rest svc using WCF Web API. My GET Requests work just fine but i can't seem to get PUT requests to work. I keep getting 404 errors like the resource isn't there but it is. Server Code:
coding4fun
  • 8,038
  • 13
  • 58
  • 85
0
votes
1 answer

How to Get the Array of data from json array using WEB API in mvc3?

I have create web services using Web Api in mvc3,in this i want get the data from json. Json Result like this {"order": { "locationid": "1", "deviceidentifier": "XXXXXXXXXXXXXXXXXXXXXXX", "ordercontactname": "XXXXXXXXXXXXXXXXXXXXXXX", …
Victor
  • 555
  • 6
  • 15
  • 39
0
votes
1 answer

registering routes wcf web api

I have a problem with an Api I'm currently developing with WCF Web Api, this is the thing: I want to register several resource classes as service contracts. So I have a RootResource from which I can access ChildResource1, ChildResource2,…
Daniel
  • 2,484
  • 4
  • 27
  • 35
0
votes
1 answer

reduce complexity of service class

I am developing a web api using WCF Web Api preview 5. At the moment I have a resource class fully functional, how ever I noticed my methods inside this resouce are getting complex. For example: [WebInvoke(UriTemplate =…
Daniel
  • 2,484
  • 4
  • 27
  • 35
0
votes
2 answers

WCF Web Api with HTTPS

Just to put some context. ASP.NET MVC2 Web API 5 IIS 7 I am trying to use the WCF Web API and as soon as I enable HTTPS, it stop working. Things I noticed: My API call I do through jquery, and I have something like this as the…
Oakcool
  • 1,470
  • 1
  • 15
  • 33
0
votes
1 answer

Pass multiple parameters into WCF Web API-service

I'm wondering about the behind the scenes magic that's happening when you create a WCF-Web service. In one old project I got methods that I can call from JavaScript that look like this [OperationContract] [WebInvoke(Method = "POST", ResponseFormat =…
HerrLiljegren
  • 157
  • 3
  • 15
0
votes
1 answer

configure wcf webapi using web.config

I'm currently configuring an existing WCF SOAP webservice to be accessible using WebApi I have added the WebApi attributes, and the following code into global.asax: RouteTable.Routes.SetDefaultHttpConfiguration(new WebApiConfiguration() {…
stevenrcfox
  • 1,547
  • 1
  • 14
  • 37
0
votes
1 answer

WCF Web API Test Client thinks it's on a different port?

When I try to access my WCF Web API Test Client through the browser it thinks that it's running on port 84 instead of 83 (I'm running in the Azure Development Fabric). It changes the URL to "http://machinename:84" instead of "http://localhost:83". …
Ryan Rinaldi
  • 4,119
  • 2
  • 22
  • 22
0
votes
1 answer

DTOs in a WCF Web Api project

Ive been reading on some best practices for exposing Data over WCF Web Api and in many places it seems to be recommended not to use Domain Entities to expose your data but to use DTO for this. What I cant find is a sample on the web on how to…
nacho10f
  • 5,816
  • 6
  • 42
  • 73
0
votes
2 answers

WCF Web API, Hammock and WP7 Woes

Facing an interesting issue when I am using WCF Web API with Hammock and WP7. As you know, WCF Web API allows you to change the response type based on what you specify in the Accept header. For e.g. if you send Accept:application/json, the response…
Anup Marwadi
  • 2,517
  • 4
  • 25
  • 42
0
votes
1 answer

Child objects not binding to model in wcf web api

Him I'm using the WCF Web API for creating a restful services. I've a method with following signature [WebInvoke(UriTemplate="AddJob")] public string AddJob(Job job) { //... } The Job object has a child object RecurDay. the posted values from…
VJAI
  • 32,167
  • 23
  • 102
  • 164
0
votes
0 answers

Https error in WCF Web Api REST service

I've a windows xp machine with IIS 5.1 and I've signed the Default Web Site with a self created certificate. Now I've a REST service built using WCF Web API running under the default web site and when I try to invoke a particular resource I'm…
VJAI
  • 32,167
  • 23
  • 102
  • 164
0
votes
1 answer

Returning JSON from WCF Web API

The WCF Web API returns data either XML or JSON based on the Accept parameter in the request header not considering whether we set ResponseFormat=WebMessageFormat.Json in the WebInvoke/WebGet attributes. Is this the correct behavior of the API or a…
VJAI
  • 32,167
  • 23
  • 102
  • 164