WCF web service: downloading a file, processing this file, downloading the resulting processed file

I can process the process where the file is located, but before I go crazy, did someone create a simple service and a wcf client (running under Windows or IIS) that I can use to download the file and download this file? with the least number of lines of code? (C # or VB)

compression and encryption would be cool, but I will use this layer later!

Thank!!

+3
source share
3 answers

You should be able to do this quite easily. The service contract is likely to look like this:

[ServiceContract]
public interface IFileService
{
  [OperationContract]
  byte[] ProcessFile(byte[] FileData);
}

WCF . , WCF , GZipStream.

, , , , WCF . .

+2

, , , -.

, , , []. , , OutOfMemory Exceptions.

[ServiceContract]
public interface IFileService
{
  // returns a Guid which you can use later to request the processed files
  [OperationContract]
  Guid SendFileToProcess(stream streamedFile);

  [OperationContract]
  Stream GetProcessedFile(Guid fileId);

  // use this to poll whether the service has finished processing
  [OperationContract]
  bool IsFileProcessed(Guid fileId);
}
+3

WCF / . , article .

0

All Articles