MultiPart/Form-Data
-
I'm trying to perform an upload to an ASP.NET webpage from a handheld device. I'm building a request and posting it and the file is getting up to the server, and it's the correct length. However, it can't be opened. I'm encoding using ASCII as when I do using UTF8, the file is not the correct size. If I run the form from the page, the file uploads perfectly. My request looks like; --8cb3310dd4ceed9 Content-Disposition: form-data; name="__VIEWSTATE" /wEPDwULLTE2OTYyNjE1OTVkZMfpfFSzt/YF7vZvjpHY4Ap3YSYj --8cb3310dd4ceed9 Content-Disposition: form-data; name="__EVENTVALIDATION" /wEWAwL++b/LAQKpya/eBQLc7/3IC+cHmY1+N1ZM0CEeEny3NKie7uiu --8cb3310dd4ceed9 Content-Disposition: form-data; name="upload_id" 2321 --8cb3310dd4ceed9 Content-Disposition: form-data; name="databaseFile"; filename="database.sdf" Content-Type: application/octet-stream Content-Transfer-Encoding: binary Content-Length: 3395584 ? ? If I don't put the file in, I can see the rest of my request, and it ends with; --8cb3310dd4ceed9-- What encoding should I be using, and how should I be including the file. I've been searching for about 6 hours, looking at examples and can't see what I'm doing wrong. I'm posting this in ASP.NET rather than C# on the assumption that it's more web-based. I don't want to double post, so here's hoping this is the right area.