Christian P.
Christian P.

Reputation: 4884

Exception Handling through C# Web Services

This question relates to this question which I asked earlier this week.

The answer given was correct, except I forgot to mention we were not using WCF, but regular XML Web Services, where there's no [DataContract] - all methods are simply prefixed with [WebMethod].

Is there any similar way of handling exceptions using this service? The idea of FaultContracts would be nice, but it does not seem this applies to non-WCF services.

EDIT: Both server and client are written in .NET (C#), so it is not so much a matter of the format returned but the ability of the client program to identify and catch the proper exception instead of a generic Soap/FaultException.

Upvotes: 3

Views: 9339

Answers (1)

Related Questions