Last post Aug 30, 2010 09:36 AM by anthony.selby
Feb 17, 2010 04:28 PM|college.boi|LINK
Hoping that someone can help me with this. I've been tearing my hair out for days looking for sources and coming up with nothing.
Basically, the scenario is this: I'm working on a project whereby an iPhone will make an HTTP-POST call to an .ashx file on my site. The POST will consist of some fields and a file.
I'm having difficulty - read that as no luck what-so-ever - in finding the form fields or the file when I look at the HTTPContext object in the debug mode of Visual Studio. And if I look at HTTPContext.Request.Files.Count (where I would expect to find a
file count) the value is always zero!!
Please help, very confused by this!
Feb 19, 2010 06:52 AM|qwe123kids|LINK
have tried reading useragent..
Feb 23, 2010 06:39 AM|college.boi|LINK
Thanks for this, but not sure that it helps. Essentially the script that I'm writing will handle a file upload from an HTML form, an iPhone, or any other device able to upload via HTTP-POST.
My issue is more related to where I find the uploaded file and the form fields when the data is sent using the encoding type of 'multipart/form-data'
Aug 25, 2010 02:43 PM|anthony.selby|LINK
I've got the exact same problem ... did you ever find a solution ?
Aug 26, 2010 01:17 AM|rstrahl|LINK
Is this issue isolated to iPhone uploads or can you repro this for other browser uploads as well? If it's just the iPhone it sounds like there might be a problem with the encoding from the iPhone upload? You might want to check the HTTP messages with Fiddler
or FireBug to see what the difference is.=
+++ Rick ---
Aug 30, 2010 09:36 AM|anthony.selby|LINK
I didn't even make it to the file issue yet, I'm still working on the form data ...
if I send this:
POST (Location of web site)
Host: (Web Site)
on the .ashx page in the context object @ context.request.form I get the results I was looking for
if I send this
POST (Location of Web Site)
Content-Type: multipart/form-data; boundarty=mfndata
Host: (Web Site)
Content-Disposition: form-data; name="ToEmailAddress"
I get a 500 server error key not found in dictionary, I could send the first request with a key and then a 2nd request but I would rather do it all as one, if anyone has any ideas why i'm getting that server error and how to get around it