tags:

views:

14

answers:

2

Microsoft has provided surprisingly small amounts of information regarding this issue or I do not know enough about the problem to locate the documentation.

When consuming web services using the traditional VS2005 and .NET 2.0 web service proxies, aside from FaultExceptions, what sort of communication exceptions can be thrown and through which assemblies/namespaces.

I am having difficulty locating the equivilent to WCF's ServiceActivationException and CommunicationException from System.ServiceModel - are these the same exceptions?

+2  A: 

Pretty much all WCF related exceptions descend from CommunicationException so if you consult the list of descendant classes in the MSDN documentation, you should be covered.

Exceptions are the generic TimeOutException (from the System.Net namespace) and the QuotaExceeded exception from the System.ServiceModel namespace which surprisingly does not descend from CommunicationException - why that is the case, I don't know.

marc_s
A: 

An ASMX proxy can throw SoapException, or anything that can be thrown by HttpWebRequest.

However, you have to ask yourself: why do you care? What are you going to do differently between one exception type and another? Can you actually handle any of these exceptions, or will you simply log them and let them propagate (I hope you're not going to catch them and then ignore them).

John Saunders
I suppose your answer made me think a little, but I must admit I find it mostly offensive. Why would you make an assumption that I'm swallowing exceptions?There was plenty of good information in your answer but the quality of my design work doesn't need to come into question.
Eugarps
Where did I _assume_ you're swallowing exceptions? I said "I **hope** you're not going to catch them and then ignore them".
John Saunders
It just came across as pedantic.
Eugarps
@Eugarps: of _course_ it's pedantic, I was trying to teach you why you don't need to, or want to, know all the possible exceptions.
John Saunders