Hi
I have created a WCF REST service within that i created Get method and POST method
[OperationContract]
[WebGet(UriTemplate = "/GetOrderDetails/{OrderID}",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json)]
OrderContract GetOrderDetails(string OrderID);
[OperationContract]
[WebInvoke(UriTemplate = "/PlaceOrder2",
RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json, Method = "POST")]
bool PlaceOrder2(string order);
i am able to call the GET method, but i am not able to call the POST method i am getting Error as
Method not allowed
i tried like : http://localhost:51094/OrderService.svc/PlaceOrder2/54
Please let me know two thing:
1. where i am wrong ?
2. How to pass resolve that error.
3. how to pass complex object as json and call the method.
Thanks
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Midhun TpPosted Aug 29, 2016, 5:37 AM
Arvind SinghPosted Aug 29, 2016, 3:48 AM
Akshay PhadkePosted Aug 29, 2016, 3:25 AM