Can someone spot the problem with this implementation? I can open it up in the browser and it works, but a call from client side (using both jquery and asp.net ajax fails)
for method not allowed error, all you need to check is to make sure that your http web call /request is the same as the one specified in [WebInvoke...] in the service
$.ajax({
type: "POST",.....});
SHOULD BE IDENTICAL TO WHAT WAS SPECIFIED IN THE SERVICE INTERFACE (UNDER "[Operation Contract]")
[WebInvoke(Method = "POST",BodyStyle = WebMessageBodyStyle.Wrapped,ResponseFormat = WebMessageFormat.Json)]
The example on your link uses a Http POST, not a Http GET. That's the "method [that's] not allowed" - you need to change the code to do a GET instead.
The link you post that was your source for client code has this block:
$.ajax( {
url: url,
data: json,
type: "POST",
processData: false,
contentType: "application/json",
timeout: 10000,
dataType: "text", // not "json" we'll parse
Note the type: "POST"
in there - yours would need to be "GET". I'm assuming you've taken your JQuery from the link you posted, because the 405 status suggests that your calling code is wrong, not the service.