I have created a WCF Data Service and it works fine. My Custom methods that are GET type methods work ok as well. The problem is in POST custom method.
The method looks like that:
[WebInvoke(Method = "POST")]
public string CustomMethod(string myParameter)
{
return "yes" + myParameter;
}
I also invoke:
config.SetServiceOperationAccessRule("CustomMethod", ServiceOperationRights.All);
Then in fiddler my request looks like that:
Method: POST
URL: http://localhost:1219/DataService.svc/CustomMethod
Reguest Headers:
User-Agent: Fiddler
Host: localhost:1219
Content-Length: 27
Content-Type: application/x-www-form-urlencoded
Request Body:
myParameter=parameter1value
The method gets called but the "myParameter" parameter is always null. What am I missing?
Thanks for your time.