Search code examples
c#.netwcfwcf-binding

Is changing from wcf binding transferMode from "Buffered" to "Streamed" considered a breaking change for the client?


I have a WCF service endpoint that serves binary documents through a stream. The endpoint looks something like this:

public Stream GetFile(int fileId){
...
}

The basicHttpBinding for this service endpoint is configured erroneously to use TransferMode="Buffered". The service endpoint is currently used by integrating parties outside my control. Due to the memory consumption issues with buffered transfermode I want to change this to TransferMode="Streamed".

Can I safely do this change on the service binding configuration and expect that this will not break anything for any integrating parties?


Solution

  • To the best of my knowledge, WCF streamed mode transfer is opt-in at the client, meaning that even if you change it at the server, unless the client changes their end as well they'll still receive the stream in its entirety before serving it as a buffered chunk of data. In other words, it should be transparent to your clients, but will enable them to opt-in to a streamed response.