Sudhanshu
Sudhanshu

Reputation: 31

Exception while IsOneWay is True

I am new to WCF. I have a small question to ask.

Let's assume IsOneWay=true is set in for one of the OperationContracts in my service contract. Let's say when client calls this method and some exception occurs in the method what happens.

Besically I want to know when this property is set to true how the exception behaves.

Please reply. Thanks in Advance Sudhanshu

Upvotes: 3

Views: 537

Answers (1)

marc_s
marc_s

Reputation: 755531

Depends on the type of error:

  • if it's an error in your actual service code, then nothing will happen, since the server cannot communicate back anything - the service operation just won't happen. The client channel will be in a faulted state for any future non-one-way call, i.e. unusable for future operations, so you'll have to recreate it to use it again

  • if it's a security or timeout error, the exception on the client will still happen - those aren't affected by the IsOneWay=true setting

Does that answer your question? If not: what do you need to know?

Upvotes: 7

Related Questions