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.

Re: file upload is not as easy as expected for ".NET"... by Kalpesh

Kalpesh
Mon Nov 10 00:39:06 CST 2003

See WebClient.UploadFile method, under System.Net namespace

HTH
Kalpesh


Re: file upload is not as easy as expected for ".NET"... by Antonio

Antonio
Mon Nov 10 07:07:48 CST 2003

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


"Antonio Lopez Arredondo" <adog@someplace.com> wrote in message
news:%23V61H8zpDHA.2820@TK2MSFTNGP10.phx.gbl...
> 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.
>
>
>




Re: file upload is not as easy as expected for ".NET"... by Antonio

Antonio
Mon Nov 10 07:17:45 CST 2003

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



"Antonio Lopez Arredondo" <adog@someplace.com> wrote in message
news:%23V61H8zpDHA.2820@TK2MSFTNGP10.phx.gbl...
> 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.
>
>
>