Q: How to prevent WCF NetTCP message size quota exceeded -


is there effective ways prevent message size quota exceeded nettcp service returns undetermined-sized collection? example have following service:

public list<string> getdirinfo(string path) {     list<string> result;      result = new list<string>(directory.enumeratedirectories(path));     result.addrange(new list<string>(directory.enumeratefiles(path)));      return result; } 

which returns list of directories , files in given path. @ times, reached message size quota, e.g. return c:\windows\system32.

without changing message size quota, best way handle or prevent sort of service call? few ways can think of:

  1. convert stream service call
  2. implement pagination
  3. as prevention, check size of result prior returning.
  4. implement callback mechanism service return series of fixed sized result client.

is there wcf configuration returned message split multiple packets , reconstruct clr while confining message size quota.

edit:

i saw several postings on similar subject matter, involved in changing message size. do not want change default message size minimized dos attacks.

i want advise on best practices , how guys handling/implementing such case returning result might exceed message size quota.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -