Here is my wcf restful services created by me.
[OperationContract]
[WebInvoke( Method="GET",
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
BodyStyle = WebMessageBodyStyle.Wrapped,
UriTemplate = "GiveMenu")]
Stream GiveMenu();
[OperationContract]
[WebInvoke(Method = "POST",
BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json,
RequestFormat = WebMessageFormat.Json,
UriTemplate = "GetOrder/{order_json}")]
bool GetOrder(string order_json);
Here I can fetch data from GiveMenu method like this :
http://localhost:5203/Service1.svc/GiveMenu
But when i am trying to post data like this :
http://localhost:5203/Service1.svc/GetOrder/{"order":[{"Tb_id":1,"Item_id":1,"Quantity":1,"Add_Details":"null"}]}
Then i said :
HttpException (0x80004005) : A potentially dangerous Request.Path value was detected from the client (:).
Then i did following correction in my web config file :
<httpRuntime targetFramework="4.5" requestPathInvalidCharacters=""/>
Then i showed be Method not allowed like this :
What should i do to make data post work and solve this error.