By default WCF service wrap JSON response in \"d\" wrapper and there I found a problem with parsing it.
If I parse with JsonConvert.DeserializeObject(respons
Maybe this helps.
The service:
namespace Application.Service
{
[ServiceBehavior(UseSynchronizationContext = false,
ConcurrencyMode = ConcurrencyMode.Multiple,
InstanceContextMode = InstanceContextMode.PerCall),
AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class VendorService : IVendorService
{
public List RetrieveMultiple(int start, int limit, string sort, string dir)
{
//I don't do any manual serialization
return new Vendor();
}
}
}
The contract:
[ServiceContract(Namespace = "Application.Service.Contracts")]
public interface IVendorService
{
[OperationContract]
[WebInvoke(ResponseFormat=WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
List RetrieveMultiple(int start, int limit, string sort, string dir);
}
My Svc file has just this line:
<%@ ServiceHost Service="Application.Service.VendorService" %>
Web.config