tags:

views:

52

answers:

2

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

+1  A: 

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?

marc_s
A: 

Your answer was to the point I was looking for and actually i was thinking on this line.

Thanks a ton.

Sudhanshu
Please get in the habit of **accepting** the best answer provided, the one solving your problem. See: http://meta.stackoverflow.com/questions/5234/accepting-answers-what-is-it-all-about
marc_s