Can a channel with WebHttpBehavior be in a faulted state?
I'm using WCF to communicate to a 3rd party REST/JSON servic开发者_如何学运维e. Since it's WCF, I create a channel and send requests through it using WebHttpBinding
and WebHttpBehavior
. I am the client consuming the service. Is it possible for my channel to be stuck in a faulted state (where I would have to call Abort
and recreate it to continue using it)? I have tried using it to make calls that return 404 errors or 500 errors and subsequent requests on the same instance of the channel still succeed.
It makes sense to me that it wouldn't fault, because this type of service is very disconnected compared to other services.
WebHttpBinding
doesn't use sessionful channel so error on the service will not fault the channel but you should still correctly handle closing and aborting channel in case of communication exceptions etc.
精彩评论