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

how to pass Json array in string - webapi in asp

I am using post method in that method i want to pass entire Json in string like this way {Data:" JsonArray"} in Jssonarray I want to pass this value { "version" : 2, "query" : "Companies, CA", "begin" : 1, "end" : 3, "totalResults" :…
tiru
  • 789
  • 5
  • 20
  • 42
3
votes
3 answers

How to host Web API in Windows Service

I have several resources that I'd like to expose using the WCF Web API. I've investigated the Web API using a Web host but our services all run as Windows Services in production so it's time for me to put the tests aside and verify that everything…
SonOfPirate
  • 5,642
  • 3
  • 41
  • 97
3
votes
1 answer

DataContractJsonSerializer leaving quotes in strings

I am using the DataContractJsonSerializer on Windows Phone 7.1 (Mango RC) to pull data from a web service. The data from my web service looks like this: [ { "Color":"\"black\"", "CurrentPlayerTurn":1, …
Kevin Hoffman
  • 5,154
  • 4
  • 31
  • 33
3
votes
2 answers

Set Accepts in HTTP Download Request Header

I have a WCF Web Api endpoint that returns an invoice: http://localhost/api/invoice/23 The format it returns is that of the accepts header in the request. If the Javascript wants JSON or XML then it just sets this in the accept header. This is how…
Daniel Revell
  • 8,338
  • 14
  • 57
  • 95
3
votes
3 answers

Wcf Web Api service routes conflicting with regular asp.net mvc routes (web api preview 4)

I noticed that my mvc app is creating wrong url's when using: @using (Html.BeginForm("Test", "Test")) { } This is the generated html source:
santiagoIT
  • 9,411
  • 6
  • 46
  • 57
3
votes
3 answers

WCF Web API security

How can I configure wcf web api service for HTTPS transport? Does anyone know how much this will change in the final release since this is one of the areas they say will change?
Darth
  • 33
  • 3
3
votes
2 answers

Change WCF WebApi HttpContent response

Using the WCF Web API how would I go about changing a response's content body after the application logic has been run but before it's returned to the user. The goal is if suppressstatuscontent is true we: Add a statuscode field to the content…
Luke Belbina
  • 5,708
  • 12
  • 52
  • 75
3
votes
1 answer

How to create query expression for Odata for get by Id

I have created an OData service and now I am trying to consume this service at client side. I wants to create an expression such as for the below url in the c# query expression- http://odata.org/Product-Service/Product(150) The above url is working…
user1301587
  • 455
  • 4
  • 11
  • 23
3
votes
2 answers

Communicating between multiple decoupled systems

We have multiple, decoupled systems. These systems provide public APIs which are consumed by mobile apps and other client applications. We now need these systems to internally communicate with each other during some calls (for whatever reason). I…
Dave New
  • 38,496
  • 59
  • 215
  • 394
3
votes
1 answer

Migrating WCF Services to ASP.NET Web API - reuse ServiceAuthorizationManager?

I am migrating some WCF services to Web API. Is is possible to reuse the ServiceAuthorizationManager or is it strictly for WCF?
jchadhowell
  • 1,131
  • 1
  • 14
  • 25
3
votes
1 answer

Convert jquery mobile mvc4 web application to phonegap

I've created one Jquery mobile mvc4 web application using webapi support, which is well looking site in almost all mobile device as well. but now i want to convert this MVC application to phonegap to use mobile feature supports like…
3
votes
1 answer

Asp.net Web API self host service unhandled exception when client drops connection

I'm using web api self host inside a windows service and I've encountered a problem and after googling for couple of hours haven't found a reasonable answer. One of the api controllers serves large stream of data (not really that large, couple of…
miensol
  • 39,733
  • 7
  • 116
  • 112
3
votes
1 answer

some problems about asp.net webAPI

I'm now building a App that use asp.net webAPI on the server side,I got a problem about the validation: I want to provide my webAPI for multi-platform,just like browser's javascript,or windows phone ,and so on,so I decide to implicit the validation…
Daniel.Woo
  • 636
  • 1
  • 10
  • 17
2
votes
1 answer

How to pass an array in the Uri to a WCF WEB API service?

Is there a way to pass an array of values to WCF WEB API service using a GET? I want to make the following call to my…
mattruma
  • 16,589
  • 32
  • 107
  • 171
2
votes
1 answer

Headers disappearing when using HttpSelfHostServer

I'm in the process of migrating a rather extensive REST service from WCF to ASP.NET WebAPI. We are using the Authorization header to send tokens from client to the server, and I implemented a DelegateHandler with code that responds with a 401 as…
Hendrik W. Hansen
  • 391
  • 1
  • 3
  • 14