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

WCF REST - Myriad of ways to create - How to choose?

I am learning to create RESTful services using WCF. There are a myriad of options to choose from. I am confused as to what should i use. 1.)REST Starter kit - Seems to be obsolete 2.)WCF WEbhttp service 3.)WCF Web API 4.)ASP.NET web api I dont want…
Hari Subramaniam
  • 1,814
  • 5
  • 26
  • 46
2
votes
1 answer

Castle.ActiveRecord.dll not compatible with ASP.NET MVC 4 Web API

MSFT claims that .NET 4.5 is backwards compatible with .NET 4. I went ahead and installed .NET 4.5 and VS 11, then created a new ASP.NET MVC 4 Web API project. When I reference the Castle.ActiveRecord.dll (version 3.0.0.0) into my Web API project,…
Justin
  • 17,670
  • 38
  • 132
  • 201
2
votes
5 answers

Can Web API convert XML into Json?

I've got a legacy web service which I'd like to wrap with a new MVC Web API, question is can I get the ASP.NET Web API to convert my xml into json? A thought that I had was to use XDocument to create a dynamic object and return that, but when I…
nieve
  • 4,601
  • 3
  • 20
  • 26
2
votes
1 answer

How To Pass Integrated Authentication User on to Another Web Service Using WCF Web Api

I have the following setup: Intranet Application --> Call WCF Web Api --> Calls Autonomy Worksite Web Server The call to the worksite web server must be from the authenticated active directory user making the call to the intranet application. So I…
Dave Stringer
  • 349
  • 4
  • 15
2
votes
3 answers

Is there any way to control JSON formatting with the WCF Web API?

With the upcoming WCF Web API, is there any way to control JSON output? I'd like to change the casing and perhaps suppress that certain properties are included when a class is being serialized. As an example, consider this very simply…
Mark Seemann
  • 225,310
  • 48
  • 427
  • 736
2
votes
1 answer

Unable to deserialize contract after changing route registration

I have an existing WCF Web API app that is registering routes using the following pattern: RouteTable.Routes.Add(new ServiceRoute("MyService", new WebServiceHostFactory(), typeof(MyServiceImplementation))); I recently updated to Preview 6. I also…
David Savage
  • 760
  • 5
  • 15
2
votes
1 answer

ssl channel wcf web api?

I'm currently developing a web api, with WCF web api, which allows me to write restful apis. One concern I have is security. For this reason I decided to protect my api with the OAuth protocol which works very good. However, the team got to the…
Daniel
  • 2,484
  • 4
  • 27
  • 35
2
votes
1 answer

WCF Web Api optional parameters in UriTemplate

How to declare optional parameters in UriTemplate in WCF Web Api ? For example : [WebGet(UriTemplate = "?culture={culture}")] HttpResponseMessage> GetAll(); I need culture to be optional parameter. If culture is not passed I…
Radenko Zec
  • 7,659
  • 6
  • 35
  • 39
2
votes
2 answers

RESTful service in .net - which is better choice WCF or ASP.NET MVC?

I plan to write web app which will work mostly on client side (AJAX) and RESTfully communicate with server using JSON and have another client which will use XML (or eventually JSON too). This app will have client authentication but is rather simple…
Pol
  • 5,064
  • 4
  • 32
  • 51
2
votes
1 answer

Problems debugging WCF Web Api REST service

So I have created a REST service based on WCF Web API. It runs fine on my local IIS. But when I deploy it to an external server it doesnt work. In my global.asax.cs I map a route "MyRoute" to a class MyHandler. So whenever I go to…
tycom iplex
  • 131
  • 1
  • 8
2
votes
0 answers

WCF API and API Key authorisation

Written or started to write a WEB API rest service in WCF. It's all going relatively well. However, I've come across a small problem. I've implemented this;…
philbird
  • 789
  • 1
  • 8
  • 15
2
votes
1 answer

Protecting my REST service, which I will use on the client side with APIkey

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. For example, lets…
Radenko Zec
  • 7,659
  • 6
  • 35
  • 39
2
votes
1 answer

Authenticate Android client on WCF Webapi site?

I want to implement a REST-api in C#. I found that WCF Webapi can do that. My first question is how I can give only authenticated users access to my api? And the second question is if the client to be authenticated is a Android-device, how do I do…
Erik Z
  • 4,660
  • 6
  • 47
  • 74
2
votes
3 answers

Request URI in MediaTypeFormatter

I'm trying to output different formats of a type depending on the URL of the request. Up to Preview5 I did the following to get the URI in the MediaTypeFormatters OnWriteToStream-Method: var requestUri = OperationContext.Current …
Joachim Rosskopf
  • 1,259
  • 2
  • 13
  • 24
2
votes
2 answers

Returning complex objects using WebApi using Entity Framework 4

I've built a REST service using WebApi and Entity Framework. In my application I've got 2 projects - one with the API functionality and the other with the model classes that I will use in my web project. The problem I'm having is that I cannot seem…
Matthew Merryfull
  • 1,466
  • 18
  • 32