[OperationContract] [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "SaveCardTemplateById")] bool SaveCardTemplateById(CI.Data.DataModel.CardModel objCard);
Quote:Are you calling the service from the browser? If so, the browser requests the service using HTTP GET while the service method is mapped to HTTP POST, Method = "POST", thus resulting in the error "Method not allowed". To fix, either change to Method = "GET" if it makes sense with regards to REST or try calling the service method from a tool that supports POST, e.g. Fiddler or WcfTestClient
Are you calling the service from the browser? If so, the browser requests the service using HTTP GET while the service method is mapped to HTTP POST, Method = "POST", thus resulting in the error "Method not allowed".
Method = "POST"
"Method not allowed"
To fix, either change to Method = "GET" if it makes sense with regards to REST or try calling the service method from a tool that supports POST, e.g. Fiddler or WcfTestClient
Method = "GET"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)