locked
HttpHandler and WebClient class RRS feed

  • Question

  • User-732283392 posted
    I've got an upload page that takes in a file, then posts it out to a remote server that listens (using an HttpHandler) for requests, pulls in the file, and saves locally. This all works great, actually, EXCEPT, when the file that is being posted out to the remote server is > 3 MB. Is there a size limitation to using the WebClient.UploadValues() function? I get a: The remote server returned an error: (400) Bad Request. Error. I think this has something to do with the framework, because it only occurs with larger sized files. But it could possibly be IIS blocking the POST requests because of the size? Anybody have any ideas about this problem, or possibly a work around?
    Saturday, March 6, 2004 2:42 PM

All replies

  • User-1822225362 posted
    The is somewhere you set MaxRequestLimit, i think it is web.config. Did you try that?
    Saturday, April 3, 2004 1:35 PM
  • User-1391363652 posted
    There was a loooong discussion about it in this thread. See if you can find an answer there.
    Saturday, April 3, 2004 8:16 PM
  • User-732283392 posted
    I actually found a better method to pull in large files by getting in front of IIS and grabbing the raw request stream, parsing it, etc. that way i don't hold the whole file in memory (i chunk it in) and i don't run in to any issue with the maxRequest or requestLength variable problems (you can only set them so high, eventually you'll time out). Which is exactly what that post was about (could have used it then!) Thanks for your help though.
    Monday, April 5, 2004 10:54 AM