0

I want to upload a large file of tracking numbers and process them into our ordering system.

I used to use

 Server.ScriptTimeout = 3000

It worked until we upgraded our servers and now it crashes.

I'm Getting

 This webpage is not available
 The connection to www.YourSite.com was interrupted.

I could see the .csv file has been uploaded, but many tracking numbers do not get processed.

I'm thinking of maybe switching to a asynchronous update. But I cannot find any good source for it.

If you have any good ideas, please let me know. Thanks

monsey11
  • 243
  • 4
  • 18

1 Answers1

0

How big is the file?? It may be because of the file size limitation in the machine.config. Try adding this to your web.config

<location path="Upload">
    <system.web>
        <httpRuntime executionTimeout="3000" maxRequestLength="20000" />
    </system.web>
</location>

Also, I don't recommend changing the value in the machine.config. Better to have a single entry for large uploads rather than opening up every page to large uploads to help reduce DOS attacks.

To process the file asynchronously, have a look at using a BackgroundWorker.

http://gugiaji.wordpress.com/2012/02/29/backgroundworker-intro-part-1-work-with-progressbar/

Chris Gessler
  • 22,727
  • 7
  • 57
  • 83
  • Thank you Chris. It looks like we have a bigger issue on the server and it crashes at certain points. I have a copy of the site locally and it works but on the server it crashes. Where do i start? – monsey11 Jun 26 '12 at 17:52
  • I'd start my looking at the IIS logs and System logs. There should be something in there indicating what failed. After that, try inserting some debug code that outputs to local file. – Chris Gessler Jun 26 '12 at 18:31
  • Here is the new question, please let me know if you can help.http://stackoverflow.com/questions/11213343/asp-net-pages-crash-in-iis-7-5-server-2008-but-worked-in-iis6-server-2003#comment14724813_11213343 – monsey11 Jun 26 '12 at 18:53