Streaming an undetermined number of objects through WCF

前端 未结 3 2099
庸人自扰
庸人自扰 2021-02-15 18:46

I have a WCF service that needs to read large (10 to 20 million) numbers of objects from the database.

What I\'d like to do, is have the client open up a stream and ha

3条回答
  •  暖寄归人
    2021-02-15 19:33

    The problem is that WCF does not provide response stream to operation. The stream returned from operation is just a "content" of some message. I tryed to trick WCF with some threading scenarios where I returned MemoryStream and tryed to fill it from other thread but as expected it didn't work.

    Mentioned HttpHandler is the only way to go.

提交回复
热议问题