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
4 answers

RESTful WCF json request and json response returns null

I am trying to build a sample for RESTful WCF. The request and response is JSON. The response that I get is: {"FirstName":null,"LastName":null} I need to get proper response. Here is the code: Web.config has configuration for Restful: service…
genericuser
  • 1,430
  • 4
  • 22
  • 40
2
votes
1 answer

Restful WCF can't reach operationcontract

I created a RESFTful WCF web service and i installed it in IIS as a new web application. The WCF has some actions like: Login, getEmployees ...etc. and it works fine when i publish and run it from vs, so i can reach from browser links…
ZORRO_BLANCO
  • 849
  • 13
  • 25
2
votes
1 answer

Difference between Put and Post in Rest

Can anyone please explain what is the difference between PUT and POST request.Also I want to know about PATCH request.
Naqi
  • 144
  • 2
  • 9
2
votes
2 answers

Rest API - 405 method not allowed

I am new to the Rest API. I am trying to call cross domain rest API from my application. Here is my code - $.ajax({ type: "GET", async: false, url: 'http://xx.xxx.xxx.xx:9003/GetProjectList', …
omkar patade
  • 1,442
  • 9
  • 34
  • 66
2
votes
1 answer

ASP.NET 4 WCF RESTful Service

I was wondering about the possibility of two things: Is it possible to use a WCF Data Service to expose "collections" that do not exist in the Entity Model (EDMX) that it is mapped to? Would this be a case where interceptors would make sense? How…
t3rse
  • 10,024
  • 11
  • 57
  • 84
2
votes
0 answers

WCF Trace log won't show spaces in messages?

I have a Restful WCF service running with Tracing enabled using XmlWriterTraceListener, it is working well with one slight issue: If user posted data contains space (or spaces) it won't recorded by the tracing log (as I can't see it in the Microsoft…
Bolu
  • 8,696
  • 4
  • 38
  • 70
2
votes
2 answers

Why am I getting a "405 Method not allowed" error on "Put" operations through a WCF Resful service?

I've got a simple WCF service which takes json as input/output parameters. It works correctly as a SOAP based service and I get the expected results. I have added RESTFul endpoints to the service. I'm using "Google-based" PostMan to test the…
JohnB
  • 3,921
  • 8
  • 49
  • 99
2
votes
1 answer

Bad Request Exception is thrown when uploading a JSON object using a POST method

I'm creating a login form using a MVC model. Actually, my application can GET, DELETE and even POST (Create) correctly. When I tried to use a POST method to send a JSON object in my Login Method, a "Bad Request" exception is thrown. Here is some…
BDeveloper
  • 1,175
  • 6
  • 24
  • 44
2
votes
2 answers

Adding REST methods to WCF Data Services?

I need to extend my WCF Data Service to include additional methods, not only the database tables.. But it doesn't seem to be working correctly. Firstly i want to ask if this is legal? or frowned upon? The reason i need to do it is i need add…
mark smith
  • 20,637
  • 47
  • 135
  • 187
2
votes
2 answers

Consuming WCF Rest services with visual studio 2010?

I am used to using soap services where you add a service reference and it creates strong types classes (return types) of each method.. Of course REST doesn't work like this How do i consume a WCF REST Service? Is there no way to use strongly typed…
mark smith
  • 20,637
  • 47
  • 135
  • 187
2
votes
0 answers

WCF REST Uri on Help page is not Correct

Been writing my first WCF Rest service and its going well... but i have a small issue, can anyone help? When i goto my help page which on local pc is like so http://localhost/WcfRestService1/help It displays the following, but the URI is wrong,…
mark smith
  • 20,637
  • 47
  • 135
  • 187
2
votes
1 answer

Handle Json Request data in WCF REST Service POST method

i am creating the REST service with POST method and OBJECT as input param. while client request am unable to get the actual JSON data client have posted. Is there any way to dig the JSON code from the C# WCF service. My code: namespace ACTService { …
Venki
  • 535
  • 2
  • 8
  • 21
2
votes
0 answers

Preflight request error 405

I'm trying to handle CORS in WCF Restful service. After going through a lot of googling, I still cannot find solution. I've attached the fiddler results below. What headers am I missing here. Request Headers OPTIONS…
Mazolo
  • 307
  • 4
  • 19
2
votes
2 answers

Reading HttpRequest Body in REST WCF

I got a REST WCF Service running in .net 4 and I've tested the web service it is working and accepting HttpRequest I make to it. But I ran into a problem trying to access the HttpRequest body within the web service. I've tried sending random sizes…
madness800
  • 181
  • 1
  • 2
  • 13
2
votes
1 answer

How to pass class object as a parameter in WCF Rest Service

Here is my Interface code [OperationContract] [WebGet(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate =…
user4391070