Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. MultiPart/Form-Data

MultiPart/Form-Data

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasesysadminalgorithms
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hammerstein05
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups