I have multiple services running as WCF Services and Web Hosts in IIS.
If a client calls an operation on a service and the operatino fails, what is the best practice for informing the client of this failure?
Should I return an exception to the client? My main concern with doing this is if I pas开发者_Python百科s an exception from a web host, it seems to occasionally crash the Application Pool due to the Rapid Fail settings.
Thanks!
I would catch the exception and pass it inside the Response object that clients wants.
And Client can try to react to it (by checking status and any exception message).
that way any bad requests wouldn't crash your web service
精彩评论