WCF Data Output and Export Results

I entered a project that uses the WCF service for the data layer. Currently, when data is needed for the grid, all rows are returned, and the results are bound to the grid, and the data set is populated into a session variable for swapping / sorting / rewriting. We are already faced with the problem of maximum message size, so I think it’s time to convert from the selection and cache to extract only the current page.

The face value seems rather easy, but there is a small catch. The user can export the entire result set at any time. This means that to view the grid, the selection of the current page is fine, but when it wants to export, I still need to make a call for all the data.

This brings me back to the problem of maximum message size. What is the recommended approach for this type of setup?

We are currently using wsHttpBinding ...

Thanks for any help.

+3
source share
2 answers

I think the recommended approach for large files is to use WCF streaming. I'm not sure about the details for your scenario, but you can take a look at this as a starting point:

http://msdn.microsoft.com/en-us/library/ms789010.aspx

+2
source

I would probably do something similar in your case

  • "GetData()" paged ", . " " maxMessageSize

  • ( ), - ZIP - , . ZIP - , WCF ,

MaxMessageSizeLimit : " ", WCF , , . , maxMessageSize 2 - , : -)

+2

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


All Articles