Reputation: 1
I have WCF service operation which accepts Interface as a input type. While calling this service operation from jQuery Ajax, I'm getting message "The server was unable to process the request due to an internal error". The jQuery code works file if the input type is concrete class. Please tell me if there is any way to achieve this kind of implementation.
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class TestService
{
[OperationContract]
[ServiceKnownType(typeof(User))]
public void SetUser(IUser request)
{
}
}
Upvotes: 0
Views: 811
Reputation: 9799
This is possible in WCF, so the question is what is the real exception message. Are you debugging the app when you make the call to the service using jQuery?
To get more information in the actual exception you should use svcTraceViewer. If you've not used svcTraceViewer before then you may want to look at a blog post on my blog
svcTraceViewer - Debugging WCF Sevices
Upvotes: 2