Upload File and custom error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alessandro

    Upload File and custom error

    Hi,
    i want to display a custm page if i upload a file with size >
    MaxRequestLengt h. I try httpmodule, etc etc but i'm not able to redirect to
    a default page.


  • =?Utf-8?B?VHJhdmlzNzU=?=

    #2
    RE: Upload File and custom error

    You may want to look at the following:



    This should provide you with a means to inspect the size and take specific
    action. I've used it in the past and it worked fairly well.

    Comment

    • =?Utf-8?B?YnJ1Y2UgYmFya2Vy?=

      #3
      RE: Upload File and custom error

      to enforce the max file size, asp.net kills the connection to stop the upload
      (there is no stop command in http). there is no way to send a response back,
      because the request was not completed.

      with javascript you can start a seperate request in an iframe or ajax call,
      that polls to see if the upload was killed, and display a message.

      -- bruce (sqlwork.com)


      "Alessandro " wrote:
      Hi,
      i want to display a custm page if i upload a file with size >
      MaxRequestLengt h. I try httpmodule, etc etc but i'm not able to redirect to
      a default page.
      >
      >
      >

      Comment

      • Alessandro

        #4
        Re: Upload File and custom error

        With an HTTPmodule i'm able to see if uploading file size is if
        MaxRequestFile size, but if i try to send user to another page, with
        server.transfer or response.redire ct i'm able to send user to that page
        (page load of FileTooLarge.as px is loaded).. but i still see on the browser
        a DNS page error..


        "bruce barker" <brucebarker@di scussions.micro soft.comha scritto nel
        messaggio news:9011554F-3D3D-46F7-B00F-D67B1555AEDA@mi crosoft.com...
        to enforce the max file size, asp.net kills the connection to stop the
        upload
        (there is no stop command in http). there is no way to send a response
        back,
        because the request was not completed.
        >
        with javascript you can start a seperate request in an iframe or ajax
        call,
        that polls to see if the upload was killed, and display a message.
        >
        -- bruce (sqlwork.com)
        >
        >
        "Alessandro " wrote:
        >
        >Hi,
        > i want to display a custm page if i upload a file with size >
        >MaxRequestLeng th. I try httpmodule, etc etc but i'm not able to redirect
        >to
        >a default page.
        >>
        >>
        >>

        Comment

        Working...