0

I have a web service method definition like so:

[WebMethod]
public void UploadFiles(List<FileClass> files)

In my client application, I have a large array that I need to pass into the web service like so:

client.UploadFiles(fileClassArray);

I would not want to use maxRequestLength, I've also read about Buffer.BlockCopy but I'm having problems with my destination array that could possibly change the web service method definition.

How do I pass this large array into the web service in chunks? Or what's the proper way to stream this array?

jmc
  • 1,649
  • 6
  • 26
  • 47
  • 1
    You shouldn't use asmx, instead [use WCF](http://stackoverflow.com/questions/2448472/what-is-the-difference-between-wcf-and-asmx-web-services). – BCdotWEB Mar 17 '15 at 12:00
  • Yes, but this is part of a legacy code that we should still support. – jmc Mar 17 '15 at 12:02
  • The best way to support it would be to rewrite it to a modern framework. You're now adding functionality to code using a framework that was considered to be outdated **five years ago**. Your problem is in part caused by that, actually. – BCdotWEB Mar 17 '15 at 12:07
  • Yes you are right, but anyway, can you give me a suggestion on the proper way to stream an array? – jmc Mar 17 '15 at 12:17

0 Answers0