file upload is not as easy as expected for ".NET"...

  • Thread starter Antonio Lopez Arredondo
  • Start date

A

Antonio Lopez Arredondo

hi all

from a environment named ".net" I expected that doing a file upload from a
winforms app to a web server (either a Web Service or a ASP.NET page) should
be pretty simple.

however I searched the web and it is plenty of documentation about how to do
it from a web page but not from a winforms app. form a web page seems to be
simpler because the asp code behind actually runs at the server.

does anybody out there has any piece of code to share with me that shows at
the winforms client side and at the web server side (either asp.net or
webservice) how to do a file upload ?

thanks in advance,
ant.
 
Ad

Advertisements

K

Kalpesh Shah

See WebClient.UploadFile method, under System.Net namespace

HTH
Kalpesh
 
A

Antonio Lopez Arredondo

I forgot to mention that the problem is with the WebClient class and the
UploadFile/UploadData methods.

building a web service that transfers byte() streams was pretty simple.

thanks again,
ant
 
Ad

Advertisements

A

Antonio Lopez Arredondo

I forgot to say that the problems are with the WebClient.UploadFile and
WebClient.UploadData methods. documentations either is not clear or they
simply doesn't work. a simple google search will show so.

building a web service that uploads a file as a byte() stream is pretty
simple and works fine. I wonder why a method called
System.Net.WebClient.UploadFile is so complex to make it work.

best regards,
ant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top