Upload huge file size: "The page cannot be displayed" browser error

Discussion in 'ASP General' started by Joe, Jan 5, 2005.

  1. Joe

    Joe Guest

    I have an upload file operation in the web application. UploadForm.asp is
    the form,
    and UploadAction.asp is the form processing.

    //UploadForm.asp
    <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    enctype=multipart/form-data>
    <input type="file" name="fileName">
    //etc ...
    </FORM>

    After I deploy the application to the web server, if I upload a small file
    size, it is fine.
    But if I upload a huge file size more than 10MB, then it cannot even go to
    UploadAction.asp.
    After 30 seconds, it has error "The page cannot be displayed" shown on the
    web browser.
    It cannot even go to UploadAction.asp. But both UploadForm.asp and
    UnploadAction.asp are
    in the same machine.

    Interestingly, if I test in local machine, I can upload any file size
    without problem.

    I don't have any hints now. any ideas?
    please advise. thanks!!
     
    Joe, Jan 5, 2005
    #1
    1. Advertising

  2. One question, is there a proxy server between the client and server in the
    failing scenario?


    --
    Jason Brown
    Microsoft GTSC, IIS

    This posting is provided "AS IS" with no warranties, and confers no
    rights.

    "Joe" <> wrote in message
    news:%...
    >I have an upload file operation in the web application. UploadForm.asp is
    > the form,
    > and UploadAction.asp is the form processing.
    >
    > //UploadForm.asp
    > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > enctype=multipart/form-data>
    > <input type="file" name="fileName">
    > //etc ...
    > </FORM>
    >
    > After I deploy the application to the web server, if I upload a small file
    > size, it is fine.
    > But if I upload a huge file size more than 10MB, then it cannot even go to
    > UploadAction.asp.
    > After 30 seconds, it has error "The page cannot be displayed" shown on the
    > web browser.
    > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > UnploadAction.asp are
    > in the same machine.
    >
    > Interestingly, if I test in local machine, I can upload any file size
    > without problem.
    >
    > I don't have any hints now. any ideas?
    > please advise. thanks!!
    >
    >
    >
     
    Jason Brown [MSFT], Jan 5, 2005
    #2
    1. Advertising

  3. Try set a higher timeout value in machine.config.

    The error occurs because your browser is still sending the file out. Of
    course the browser cannot receive response from server at the same time and
    therefore determines the web server is not responding. Common problem on
    uploading files.

    Also note that if you try to upload file with filesize larger than the
    maximum request length, the same error may result or you'll get
    "System.Web.HttpException: Maximum request length exceeded."

    "Joe" <> ¦b¶l¥ó news:%
    ¤¤¼¶¼g...
    > I have an upload file operation in the web application. UploadForm.asp is
    > the form,
    > and UploadAction.asp is the form processing.
    >
    > //UploadForm.asp
    > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > enctype=multipart/form-data>
    > <input type="file" name="fileName">
    > //etc ...
    > </FORM>
    >
    > After I deploy the application to the web server, if I upload a small file
    > size, it is fine.
    > But if I upload a huge file size more than 10MB, then it cannot even go to
    > UploadAction.asp.
    > After 30 seconds, it has error "The page cannot be displayed" shown on the
    > web browser.
    > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > UnploadAction.asp are
    > in the same machine.
    >
    > Interestingly, if I test in local machine, I can upload any file size
    > without problem.
    >
    > I don't have any hints now. any ideas?
    > please advise. thanks!!
    >
    >
    >
     
    Lau Lei Cheong, Jan 5, 2005
    #3
  4. Joe

    Joe Guest

    > The error occurs because your browser is still sending the file out. Of
    > course the browser cannot receive response from server at the same time

    and
    > therefore determines the web server is not responding. Common problem on
    > uploading files.


    Thanks Lau Lei Cheong!! To solve the problem, I try to understand the
    underlying principles first. The error "The page cannot be displayed" is the
    error from web browser because web browser failed to connect to the server
    for that requested page. correct? When UploadForm.asp post data to
    UploadAction.asp, the web browser append the huge file in HTTP header first,
    and at the same time, the web browser try to connect to UploadAction.jsp, is
    that what you mean?

    please advise more. thanks!!

    "Lau Lei Cheong" <> wrote in message
    news:#...
    > Try set a higher timeout value in machine.config.
    >
    > The error occurs because your browser is still sending the file out. Of
    > course the browser cannot receive response from server at the same time

    and
    > therefore determines the web server is not responding. Common problem on
    > uploading files.
    >
    > Also note that if you try to upload file with filesize larger than the
    > maximum request length, the same error may result or you'll get
    > "System.Web.HttpException: Maximum request length exceeded."
    >
    > "Joe" <> ¦b¶l¥ó

    news:%
    > ¤¤¼¶¼g...
    > > I have an upload file operation in the web application. UploadForm.asp

    is
    > > the form,
    > > and UploadAction.asp is the form processing.
    > >
    > > //UploadForm.asp
    > > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > > enctype=multipart/form-data>
    > > <input type="file" name="fileName">
    > > //etc ...
    > > </FORM>
    > >
    > > After I deploy the application to the web server, if I upload a small

    file
    > > size, it is fine.
    > > But if I upload a huge file size more than 10MB, then it cannot even go

    to
    > > UploadAction.asp.
    > > After 30 seconds, it has error "The page cannot be displayed" shown on

    the
    > > web browser.
    > > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > > UnploadAction.asp are
    > > in the same machine.
    > >
    > > Interestingly, if I test in local machine, I can upload any file size
    > > without problem.
    > >
    > > I don't have any hints now. any ideas?
    > > please advise. thanks!!
    > >
    > >
    > >

    >
    >
     
    Joe, Jan 5, 2005
    #4
  5. Joe

    Joe Guest

    one more, "The page cannot be displayed" means client-side web browser time
    out, or web server time out? This is very important.

    please advise. thanks!!

    "Lau Lei Cheong" <> wrote in message
    news:#...
    > Try set a higher timeout value in machine.config.
    >
    > The error occurs because your browser is still sending the file out. Of
    > course the browser cannot receive response from server at the same time

    and
    > therefore determines the web server is not responding. Common problem on
    > uploading files.
    >
    > Also note that if you try to upload file with filesize larger than the
    > maximum request length, the same error may result or you'll get
    > "System.Web.HttpException: Maximum request length exceeded."
    >
    > "Joe" <> ¦b¶l¥ó

    news:%
    > ¤¤¼¶¼g...
    > > I have an upload file operation in the web application. UploadForm.asp

    is
    > > the form,
    > > and UploadAction.asp is the form processing.
    > >
    > > //UploadForm.asp
    > > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > > enctype=multipart/form-data>
    > > <input type="file" name="fileName">
    > > //etc ...
    > > </FORM>
    > >
    > > After I deploy the application to the web server, if I upload a small

    file
    > > size, it is fine.
    > > But if I upload a huge file size more than 10MB, then it cannot even go

    to
    > > UploadAction.asp.
    > > After 30 seconds, it has error "The page cannot be displayed" shown on

    the
    > > web browser.
    > > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > > UnploadAction.asp are
    > > in the same machine.
    > >
    > > Interestingly, if I test in local machine, I can upload any file size
    > > without problem.
    > >
    > > I don't have any hints now. any ideas?
    > > please advise. thanks!!
    > >
    > >
    > >

    >
    >
     
    Joe, Jan 5, 2005
    #5
  6. "This page cannot be displayed" = client timeout.

    Brandon

    "Joe" <> wrote in message
    news:ON%...
    > one more, "The page cannot be displayed" means client-side web browser

    time
    > out, or web server time out? This is very important.
    >
    > please advise. thanks!!
    >
    > "Lau Lei Cheong" <> wrote in message
    > news:#...
    > > Try set a higher timeout value in machine.config.
    > >
    > > The error occurs because your browser is still sending the file out. Of
    > > course the browser cannot receive response from server at the same time

    > and
    > > therefore determines the web server is not responding. Common problem on
    > > uploading files.
    > >
    > > Also note that if you try to upload file with filesize larger than the
    > > maximum request length, the same error may result or you'll get
    > > "System.Web.HttpException: Maximum request length exceeded."
    > >
    > > "Joe" <> ¦b¶l¥ó

    > news:%
    > > ¤¤¼¶¼g...
    > > > I have an upload file operation in the web application. UploadForm.asp

    > is
    > > > the form,
    > > > and UploadAction.asp is the form processing.
    > > >
    > > > //UploadForm.asp
    > > > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > > > enctype=multipart/form-data>
    > > > <input type="file" name="fileName">
    > > > //etc ...
    > > > </FORM>
    > > >
    > > > After I deploy the application to the web server, if I upload a small

    > file
    > > > size, it is fine.
    > > > But if I upload a huge file size more than 10MB, then it cannot even

    go
    > to
    > > > UploadAction.asp.
    > > > After 30 seconds, it has error "The page cannot be displayed" shown on

    > the
    > > > web browser.
    > > > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > > > UnploadAction.asp are
    > > > in the same machine.
    > > >
    > > > Interestingly, if I test in local machine, I can upload any file size
    > > > without problem.
    > > >
    > > > I don't have any hints now. any ideas?
    > > > please advise. thanks!!
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Brandon Potter, Jan 5, 2005
    #6
  7. "Joe" <> ¦b¶l¥ó news:%
    ¤¤¼¶¼g...
    > > The error occurs because your browser is still sending the file out. Of
    > > course the browser cannot receive response from server at the same time

    > and
    > > therefore determines the web server is not responding. Common problem on
    > > uploading files.

    >
    > Thanks Lau Lei Cheong!! To solve the problem, I try to understand the
    > underlying principles first. The error "The page cannot be displayed" is

    the
    > error from web browser because web browser failed to connect to the server
    > for that requested page. correct?

    Yes. Exactly.

    >When UploadForm.asp post data to
    > UploadAction.asp, the web browser append the huge file in HTTP header

    first,
    > and at the same time, the web browser try to connect to UploadAction.jsp,

    is
    > that what you mean?

    Not exactly.

    When uploading files with <form encType="multipart/form-data">, the files
    are embedded in the request stream. And your page can'r return anything
    unless 1) having the stream fully receieved or 2) you process the stream
    yourself or 3) you use any of the third party conponent to process it.
     
    Lau Lei Cheong, Jan 6, 2005
    #7
  8. In fact you can Response.Write() something to push the response header of
    current page to the client first and put it in wait state. However, using
    this trick you'll no longer be able to use Response.Redirect() or
    Server.Transfer() to move to another page. You'll have to insert client-side
    script like "window.location='abc.asp';" instead.

    "Brandon Potter" <msnews@brandonpotter_nospam.com> ¦b¶l¥ó
    news:Oye$ ¤¤¼¶¼g...
    > "This page cannot be displayed" = client timeout.
    >
    > Brandon
    >
    > "Joe" <> wrote in message
    > news:ON%...
    > > one more, "The page cannot be displayed" means client-side web browser

    > time
    > > out, or web server time out? This is very important.
    > >
    > > please advise. thanks!!
    > >
    > > "Lau Lei Cheong" <> wrote in message
    > > news:#...
    > > > Try set a higher timeout value in machine.config.
    > > >
    > > > The error occurs because your browser is still sending the file out.

    Of
    > > > course the browser cannot receive response from server at the same

    time
    > > and
    > > > therefore determines the web server is not responding. Common problem

    on
    > > > uploading files.
    > > >
    > > > Also note that if you try to upload file with filesize larger than the
    > > > maximum request length, the same error may result or you'll get
    > > > "System.Web.HttpException: Maximum request length exceeded."
    > > >
    > > > "Joe" <> ¦b¶l¥ó

    > > news:%
    > > > ¤¤¼¶¼g...
    > > > > I have an upload file operation in the web application.

    UploadForm.asp
    > > is
    > > > > the form,
    > > > > and UploadAction.asp is the form processing.
    > > > >
    > > > > //UploadForm.asp
    > > > > <FORM NAME="InputForm" ACTION="UploadAction.asp" METHOD="POST"
    > > > > enctype=multipart/form-data>
    > > > > <input type="file" name="fileName">
    > > > > //etc ...
    > > > > </FORM>
    > > > >
    > > > > After I deploy the application to the web server, if I upload a

    small
    > > file
    > > > > size, it is fine.
    > > > > But if I upload a huge file size more than 10MB, then it cannot even

    > go
    > > to
    > > > > UploadAction.asp.
    > > > > After 30 seconds, it has error "The page cannot be displayed" shown

    on
    > > the
    > > > > web browser.
    > > > > It cannot even go to UploadAction.asp. But both UploadForm.asp and
    > > > > UnploadAction.asp are
    > > > > in the same machine.
    > > > >
    > > > > Interestingly, if I test in local machine, I can upload any file

    size
    > > > > without problem.
    > > > >
    > > > > I don't have any hints now. any ideas?
    > > > > please advise. thanks!!
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Lau Lei Cheong, Jan 6, 2005
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joe
    Replies:
    7
    Views:
    819
    Lau Lei Cheong
    Jan 6, 2005
  2. Replies:
    26
    Views:
    821
    Randy Webb
    Jan 8, 2005
  3. Replies:
    26
    Views:
    7,872
    Randy Webb
    Jan 8, 2005
  4. Replies:
    3
    Views:
    509
  5. Replies:
    25
    Views:
    273
    Randy Webb
    Jan 8, 2005
Loading...

Share This Page