WCF Client Proxy State
Posted
by RemotecUk
on Stack Overflow
See other posts from Stack Overflow
or by RemotecUk
Published on 2010-03-16T22:45:44Z
Indexed on
2010/03/16
22:51 UTC
Read the original article
Hit count: 370
Hi, how do I test the state of my proxy before making calls to my WCF service.
I have a duplex channel created using a duplex channel factory.
Before making any calls to the server I want to check the state of the proxy object created from the channel factory.
I saw this in a book... (to be used in immediate window)
? ((ICommunicationObject)flsProxy).State
But it gave this exception...
Cannot obtain fields or call methods on the instance of type 'System.ServiceModel.ICommunicationObject' because it is a proxy to a remote object.
Would be grateful for any ideas how this can be tested, or is it better to just catch exceptions.
Thanks.
© Stack Overflow or respective owner