FileUpload times out (.NET)

Discussion in 'ASP / ASP.net' started by EllenD, Apr 23, 2008.

  1. EllenD CSNM Customer

    Hi everyone,

    Wondering if anyone can help me with this? I have a .NET 2.0 page which uploads a file using the standard fileupload control. It works fine on smaller files but is failing with a 5Mb file.

    I've googled around and seen stuff about httpruntime settings in web.config, so I've added this:

    <httpRuntime executionTimeout="700" maxRequestLength="10000" requestLengthDiskThreshold="200" enableHeaderChecking="false" />


    but still no luck - it times out in around 5 and 1/2 minutes (gettting 'internet explorer cannot display the webpage' message).

    I've also seen mention of responseDeadlockInterval setting but this is in machine.config apparently.

    So has anyone managed to get a file of more than 4mb to upload - I would like to do up to 10mb ideally - using the .net file upload control?

    Thanks in advance for any help!

    Ellen :smilie:
  2. siphilp CSNM Customer

    You maye want to look at this page on msdn

    http://msdn2.microsoft.com/en-us/library/aa479405.aspx

    note the

    Might be worth using one of the components installed on the servers already?
  3. EllenD CSNM Customer

    Thanks for the link, I was aware of the 4Mb default but it is supposed to be configurable via web.config, which is what I was trying to do. Further down the same page..

    "...the setting that takes care of the size of the files to be uploaded is the maxRequestLength attribute. By default, this is set to 4096 kilobytes (KB). Simply change this value to increase the size of the files that you can upload to the server. If you want to allow 10 megabyte (MB) files to be uploaded to the server, set the maxRequestLength value to 11264, meaning that the application allows files that are up to 11000 KB to be uploaded to the server...."

    Anyway other components might be a good idea, do you know what is installed or where I can see a list?

    Thank you for your help :thumbup1:

    Ellen
  4. siphilp CSNM Customer

    I think the timeout might be a server side setting. Obviously if you have a slow connection trying to upload 10mb will take a while which over a http post isn't going to be stable. If it was an internal post whereby your connection to the server is very fast then you should have no problems.

    I am looking for the component list now lol...
  5. EllenD CSNM Customer

    There is a setting for timout, it is the executionTimeout="700" in the web.config line, which should be about 11 mins, although it times out in around 5 mins. So I think that what I've put in web.config is either wrong or being ignored.... but I don't know why!

    Will have a look for component list too, looks like for larger files this may be the best option.

    Cheers!
  6. siphilp CSNM Customer

  7. Mark Voss CSNM Customer

    Personally, I'd use [FONT=verdana,arial,helvetica,sans-serif]Persits ASPUpload.[/FONT]
  8. siphilp CSNM Customer

  9. Mark Voss CSNM Customer

  10. EllenD CSNM Customer

    Thanks very much for your suggestions guys! I'm a bit confused by whether any of these are .NET components, or can be used from .NET? Or are they classic ASP?

    Thanks

    Ellen
  11. Mark Voss CSNM Customer

    ASPUpload is a COM+ component installed on the CSNM servers which can be used from both Classic ASP and .NET
  12. EllenD CSNM Customer

    Thats good, I may use ASPupload in future. After a bit more investigation I found my problem seems to be solved by setting
    EnableEventValidation
    ="false"
    in my page directive - not great I know but OK in this case as the page is in a password protected extranet.

    Cheers!:thumbup1:
  13. Mark Voss CSNM Customer

    FYI, I think ASPUpload supports uploading files of up to 2GB.
  14. Carl Shepherdson Proprietor

    You can't use ASP components inside ASP.net applications.
  15. Mark Voss CSNM Customer

    I may well be wrong as I'm not an asp.NET person but I assumed you could as there are asp.NET references and code samples on the Persits website (scroll down to "Usage under .NET") along with this page from Persits support.

Share This Page