is IsOneWay attribute backward compatible RRS feed

  • Question

  • hi

    I have a WCF service and a client that uses net.tcp. The service exposes a contract that has a method marked with the IsOneWay=true attribute. My question is now if i change IsOneWay=false. Does that require me to update the service reference in the client or does this change still support old clients?

    Friday, March 20, 2020 11:52 AM

All replies

  • Hi,
    Beyond all doubt, the client needs to update the service reference. the old client proxy shall not work. This is due to that the service contract is shared by the client-side and the server-side, the service contract located in the client-side should always be identical with the one in the server-side. 
    IsOneWay=true attribute has already changed the service contract, and the operation contract can not have a return parameter. subsequently, the invocation of the service also changed, the client-side has no need to wait, running the method simultaneously without block.
    Best Regards
    Abraham Qian
    Monday, March 23, 2020 7:35 AM