WCF service exception exception without fail

When you drop FaultExceptionout of a WCF service, is there a way that it can be dropped without breaking the real connection? I’m looking to prevent an action for a specific method, but I don’t want to break the connection with the client (just return the message “you cannot do this action right now, but that’s why”). Or, it is a necessary paradigm to recreate a new proxy in an application for consuming .NET (in the case of .NET).

+3
source share
2 answers

If you throw a FaultException, the client will get an exception, but should be able to continue using the same connection. If you exclude any other type of exception from the service (without using a special error handler), it will damage the channel

+2
source

Are you using .NET 4.0, can you use WebFaultExceptionto return an HTTP status code with the corresponding error?

0
source

All Articles