Questions tagged [wcf-rest]

A REST service built with WCF

REST Service built for WCF that contains HTTP specifications for GET, PUT, POST and DELETE as well as other standard REST elements.

MSDN documentation

619 questions
2
votes
3 answers

Azure endpoints - different deployments

Currently we run a UI web role and a web service web role(WCF REST) on Azure. Each role contains 2 instances (for load balancing and meeting the SLA reqs.) The UI Web role and web service web role are within the same subscription but in different…
user275157
  • 1,332
  • 4
  • 23
  • 45
2
votes
1 answer

Json.net fails to deserialize a list of complex types

I'm using json.net to perform handle my json deserialization in a IIS hosted restful service. First, here are the objects I'm trying to work with. [DataContract] public class CreateSamplesRequest { [DataMember] public Guid SessionId { get;…
tom.dietrich
  • 8,219
  • 2
  • 39
  • 56
1
vote
3 answers

C# REST API Client Prestashop

I could GET Xml data from the Prestashop api, but couldn't PUT/POST Xml data to PrestaShop API. Could someone suggest where I might be going wrong? public POST_xml() { Uri address = new Uri("http://.../api/countries/1"); HttpWebRequest…
kiyan r.z.h
  • 301
  • 4
  • 6
1
vote
1 answer

WCF rest services defaultconnectionlimit

Looking to optimize the performance of WCF Rest services hosted on Azure. The services retrieve data from SQL Azure tables and in some cases Azure table storage. They are all on public endpoints. Question - In WebRole.cs I can see that …
user529265
  • 820
  • 10
  • 27
1
vote
1 answer

Mocking WebOperationContext

I'm using the WCFMock to mock the WebOperationContext in my web service. The only usage is to add a custom HTTP header to the WebOperationContext.Current.OutgoingResponse.Headers collection. I'm unable to verify this using Moq. What I've already…
Krishter
  • 489
  • 8
  • 24
1
vote
1 answer

WCF 3.5 REST - Data member having \r\n replaced with \n

My RESTful WCF 3.5 service accepts an XmlSerialized (as opposed to DataContract serialized) data object which contains a freeform string field. The client I wrote (which uses HttpWebRequest / HttpWebResponse to interact with the WCF service) sends…
Dai
  • 141,631
  • 28
  • 261
  • 374
1
vote
0 answers

Cannot send data with post by xdr to restful web service wcf

How can I send data with post by xdr: [OperationContract(Name = "app")] [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,UriTemplate="app",BodyStyle=WebMessageBodyStyle.Wrapped, ResponseFormat=WebMessageFormat.Json)] bool…
1
vote
2 answers

Android uploading file as ByteArray to WCF REST services

I need to send a byte arrray file using WCF rest services. I have to send the data using HttpPost method in android. The code which i am using give the status as HTTP/1.1 400 Bad Request error. private final static String URI =…
saini
  • 233
  • 3
  • 10
1
vote
2 answers

Inheriting WCF REST operations

I'm playing around with WCF REST on .NET 4.0, and I ended up wanting to find out if the following idea is somehow possible to implement? I have a very basic set of POCOs against an EF 4.1 CF project. All of them inherit from a base Entity class (for…
Richard Neil Ilagan
  • 14,627
  • 5
  • 48
  • 66
1
vote
1 answer

Are there any special deployment requirements for a REST Service to Azure?

I have written a REST service with windows azure using the WCF Rest Service Templates. Locally everything runs fine. However when I deploy to Azure then all my requests return 500 Server Error. Are there any special deployment requirements for a…
BentOnCoding
  • 27,307
  • 14
  • 64
  • 92
1
vote
1 answer

Steps to authenticate WebGet REST Service in c#.net

To this WebGet REST Service URL,Is there any steps to authenticate in c#.net?
Revathi
  • 307
  • 6
  • 18
1
vote
1 answer

Invalid RESTful WSDL v2.0 from .Net 4.0 Framework

I created a couple of WCF services. One very robust one that can accept both SOAP and RESTful requests, and provide XML and JSON responses. --EDIT: FYI: Enabling an SOAP endpoint to accept a RESTful request requires the use of [WebGet..., and as…
ElHaix
  • 12,846
  • 27
  • 115
  • 203
1
vote
3 answers

Can the RESTful service set its request and response type from "Accept" property of the client

Can a RESTFul service's request and response be serverd dynamically based on the "Accept" property of the client i.e. If the client can "Accept" application/xml then my service should automatically understand that the request and response should be…
Rajesh
  • 7,766
  • 5
  • 22
  • 35
1
vote
3 answers

WCF REST service doesn't seems to work - configuration issue?

I have a WCF service with custom binding, hosted in IIS (IIS Express in development) with following service contract: [ServiceContract] public interface IServer { [OperationContract] StreamCollection GetStreams(Guid poolKey); …
bzamfir
  • 4,698
  • 10
  • 54
  • 89
1
vote
1 answer

Force HTTPS(SSL) on a WCF WebGet method

I have a method like this: [WebGet(UriTemplate = "/")] [OperationContract] public XmlElement All() {} Is there a way to force clients to always use HTTPS? (deny HTTP and allow only HTTPS)? If yes, how? Thank you