How many bytes are transferred to WCF before I use streams?

I have a client application that is talking to the update service to download files. The update service retrieves them from the database and then sends them to the client using WCF. I am currently using WSHttpBinding to take advantage of the security benefits. So the largest file I uploaded / uploaded is around 8 MB and it works great. I recently tried it with a file about 130 MB in size, but nothing happened on the client; network usage just sat at 0%.

I assume that the file is too large to transmit without streaming (maxReceivedMessageSize, etc., equals 209715200, so I know that the settings are suitable for it). To fix this, I want the service to use BasicHttpBinding so that I can transfer the file if it is larger than a certain size.

My question is: in what size file should I switch from WSHttpBinding to BasicHttpBinding and streaming? Is there any standard that should be followed? Or is my logic here completely wrong?

+3
source share
2 answers

There is no hard rule or formula for calculating this - as usual, it depends on your circumstances.

Consider this:

  • ( ) - , 10 20

  • , WCF,

, 20 100 , 2 . , ?

, , , .

+2

marc_s, .

, , 1 . 5Mb - " ".

+1

Source: https://habr.com/ru/post/1783521/


All Articles