I\'m tearing my hair out over this one, so bear with me (it\'s a long post).
I'm not familiar with ASP or WCF, but I am quite familiar with jQuery. The one thing that sticks out in my mind about your question is that your service is returning 202 Success
when an exception is thrown. jQuery chooses which callback to call (success
or error
) based on the HTTP status code that is returned from the server. 202
is considered a successful response, and therefor jQuery will call success
. If you want to have jQuery call the error
callback, you need to make your service return a 40x
or 50x
status code. Consult http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html for a list of HTTP status codes.