2

I have a WCF Service that I'm using to distribute files to clients that works in the following manner:

  1. Clients send a file to the service
  2. Other clients poll the service asking for files
  3. If the service has any files, it return them as the result of the poll method

The problem is that when dealing with large files over a slow internet connection, the service appears to block while returning files to the client.

When I try to connect to the service from another client, it never responds until the transfer in progress finishes. I also have a timer on the service that writes out log entries. those also stop until the transfer is complete.

I think I'm missing something, but I'm new to WCF and not sure what I'm missing to prevent the service from blocking.

I think I could use callback and send the files in separate threads but I don't know if this would be a good idea or not, since I wouldn't be able to determine a suitable SendTimeout.

I am using net/tcp binding.

Jeff B
  • 8,572
  • 17
  • 61
  • 140
mkalashy
  • 103
  • 1
  • 4
  • Hmm, interesting. I'd think that each call to the service should start it's own instance, therefore, it seems like you shouldn't have the sort of single-threaded issue a normal app or `WinService` might... however, I'm also not a WCF expert, so unfortunately have no answer. But this question might be of some aid: http://stackoverflow.com/a/2543825/945456 – Jeff B Dec 10 '12 at 20:39
  • Please show the code that returns the files. – John Saunders Dec 11 '12 at 01:08

0 Answers0