jkruer01
jkruer01

Reputation: 2205

ASP.Net Prevent Timeout for Long Running Process

I have an ASP.net page that uploads a CSV file and then does some processing on it. This can possibly take up to 10 minutes to complete for a large file. However, the process ends up timing out.

I have added the following to the web.config:

<httpRuntime executionTimeout="1200" maxRequestLength="104856"  />

Also, I have gone into IIS and set the Connection Timeout to 1,200 seconds. I also set the ASP script timeout to 1,200 seconds in IIS as well.

However, after approximately 2 minutes the web log file stops getting updated.

Any ideas on what is causing this to stop processing? What other timeout settings am I missing?

THanks!

Upvotes: 3

Views: 2737

Answers (1)

Abe Miessler
Abe Miessler

Reputation: 85126

I usually try to avoid long running requests. Are you sure this is the best way to do this? In the past I have either:

  • Uploaded the document through the web app, but not acted on it. Basically upload it to a watched folder and then process it through a separate process.

  • Use an alternate method to upload the document (ftp usually). Again, process the file with a separate process.

Probably not the answer you were looking for, but it might be a better solution to your problem?

Upvotes: 3

Related Questions