Cancelling a HTTP data post

  • Thread starter Thread starter del
  • Start date Start date
D

del

Is there a way to cancel a file upload after receiving
the header of the file?

Basically, I want to allow the user to upload files (with
a certain size limit) to the server. Any files larger
than the preset size should be ignored. Once the user
submits the form I parse the http request and determine
the content length. However, the upload has already
started! and if I try to close the connection or
redirect the response to a different page I receive
a "The page can not be displayed" error.

Any suggestions?
Thank you

del
 
The size limit of the HttpRequest is set in the machin.config file (Default
to 4 MB). By changing that number you can get whatever you want. However, it
works for all the web applications on that IIS server.

Jianjun
 
Back
Top