Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception while IsOneWay is True

Tags:

wcf

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

like image 331
Sudhanshu Avatar asked Nov 18 '25 19:11

Sudhanshu


1 Answers

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?

like image 79
marc_s Avatar answered Nov 21 '25 03:11

marc_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!