TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Arvind Singh
324
5.7k
774.4k
'Method not allowed' for the POST method
Aug 29 2016 3:17 AM
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
Reply
Answers (
3
)
WCF Syndication Feeds
WCF service error