Hi,

I am currently writing a WinForm administration application for a web
application I have. I was wondering how it would be possible to upload
a file to the web server using http, just like I would on a webform
using a HtmlInputFile control.

I have a hunch that it would be possible, but I cant really figure out
how.

Does anyone have a clue as to how I would accomplish this?

--
Thomas Due
Posted with XanaNews version 1.17.5.9

"There is always some madness in love. But there is also always some
reason in madness."
-- Friedrich Nietzsche

Re: Posting a file to a web server from a winform, just like a File Input HttpControl by Hibri

Hibri
Tue Aug 16 04:20:01 CDT 2005

Hi,
Try the Webclient class in the System.Net namespace
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystem.asp


On Tue, 16 Aug 2005 09:12:36 +0100, Thomas Due <tdue@mail_remove_.dk>
wrote:

> Hi,
>
> I am currently writing a WinForm administration application for a web
> application I have. I was wondering how it would be possible to upload
> a file to the web server using http, just like I would on a webform
> using a HtmlInputFile control.
>
> I have a hunch that it would be possible, but I cant really figure out
> how.
>
> Does anyone have a clue as to how I would accomplish this?
>



--
.Hibri
www.hibri.net

RE: Posting a file to a web server from a winform, just like a File In by jch

jch
Tue Aug 16 04:33:44 CDT 2005

Hi Thomas,

If you have an asp page (containing an input element of type "file") to
handle the upload then I believe it is possible. A Google search came up
with the following:
http://groups.google.dk/group/microsoft.public.dotnet.languages.csharp/browse_frm/thread/eea92e16a26fbdc0/474b6a3fcd63dd93?lnk=st&q=uploading%2Bfile%2Bhttpwebrequest&rnum=4&hl=da#474b6a3fcd63dd93

I have not tried it myself but it looks promising.

HTH, Jakob.

--
http://www.dotninjas.dk
http://www.powerbytes.dk


"Thomas Due" wrote:

> Hi,
>
> I am currently writing a WinForm administration application for a web
> application I have. I was wondering how it would be possible to upload
> a file to the web server using http, just like I would on a webform
> using a HtmlInputFile control.
>
> I have a hunch that it would be possible, but I cant really figure out
> how.
>
> Does anyone have a clue as to how I would accomplish this?
>
> --
> Thomas Due
> Posted with XanaNews version 1.17.5.9
>
> "There is always some madness in love. But there is also always some
> reason in madness."
> -- Friedrich Nietzsche
>

Re: Posting a file to a web server from a winform, just like a File In by Thomas

Thomas
Tue Aug 16 06:22:13 CDT 2005

Thank you for the suggestions both of you. I will look into it.

--
Thomas Due
Posted with XanaNews version 1.17.5.9

"I never give them hell. I just tell the truth and they think it's
hell."
-- Harry S. Truman

Re: Posting a file to a web server from a winform, just like a File In by BVM

BVM
Wed Aug 17 01:34:40 CDT 2005

You need a web service on the server, your application must be able to
communicate with it.

Dennis

"Thomas Due" <tdue@mail_remove_.dk> wrote in message
news:%23QHVBTloFHA.2444@tk2msftngp13.phx.gbl...
> Thank you for the suggestions both of you. I will look into it.
>
> --
> Thomas Due
> Posted with XanaNews version 1.17.5.9
>
> "I never give them hell. I just tell the truth and they think it's
> hell."
> -- Harry S. Truman