Passing data to a web service

  • Thread starter Thread starter Chris Dunaway
  • Start date Start date
C

Chris Dunaway

I'm working on a Windows Forms app that communicates with a server through
web services.

One requirement that I have is that I need to be able to send a .wav file
as well as a number of records to the server.

What is the recommended method for doing this? I can package the data
records into a dataset and send that, but how would I send the .wav file?
I want to create a web method that will take both in one call but I'm not
sure how to accomplish it. Any suggestions?

Thanks,
 
You would have to serialize the image prior to passing it, as your only
option with a Web Service is to pass it as a parameter. On the other hand,
you could build an ASP.Net app (single page or handler) on the server that
takes a file upload, and have your Windows Forms app create a WebRequest and
upload the file in the same way a browser does.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Back
Top