Re: HTTPWebRequest - Programatically Uploading Text File with POST
- From: Paul <Paul@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 25 Jun 2008 05:46:01 -0700
This is similar to what I am looking for but it doesn't address uploading a
file.
I am pretty certain I need to use the HTTP content-type of
"multipart/form-data" to programatically duplicate the manual process of
uploading the file.
"sloan" wrote:
This might not be correct, but check here:.
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/msg/5d13224a77b89add
I have "POST" code somewhere in that helper I think.
"Paul" <Paul@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:041D50EB-F91C-40DA-A5EB-F1E682A2F3D7@xxxxxxxxxxxxxxxx
I forgot to add that this must all be done programatically.
No user interface, no client.
I retrieve the data that I want to upload programatically and I must
somehow
create a HTTPWebRequest that will use a POST request and the
"multipart/form-data" content type.
"Paul" wrote:
I need to programatically upload a text file to a web server using the
HTTPWebRequest object within .Net 2.0.
So far, I have determined that:
- I need a HTTP content-type of "multipart/form-data".
- I need to use the ContentType.Boundary property.
That is about as far as I have gotten.
I have searched long and far for examples to do this in .Net but I can
not
seem to find anything?
Does anyone have a code example or URL that I can look at to put the
pieces
of the puzzle together?
TIA
- References:
- Prev by Date: Re: web page <title>
- Next by Date: Re: Big picture question - Web sites vs Web Applications
- Previous by thread: Re: HTTPWebRequest - Programatically Uploading Text File with POST
- Next by thread: web page <title>
- Index(es):