---
title: "Upload file time out"  
description: "Upload file time out"  
author: "Anonymous User"  
published: 2014-08-26  
updated: 2014-08-26  
canonical: https://www.mindstick.com/forum/2139/upload-file-time-out  
category: "asp.net mvc"  
tags: ["asp.net mvc"]  
reading_time: 1 minute  

---

# Upload file time out

I currently have an [ASP.NET MVC](https://www.mindstick.com/forum/155798/what-is-caching-in-asp-dot-net-mvc) [project](https://www.mindstick.com/articles/105927/how-to-excel-at-managing-multiple-projects) that has file uploading and it works great if the user has a good enough [connection](https://www.mindstick.com/articles/13012/what-makes-ethernet-connection-better-than-wifi) and their file is of a reasonable size.

The [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) I'm running into is that sometimes a user might have a 56k connection (how they can live with it in this day and age, I don't know) or are uploading a larger file or some combination of the two.

I'd like to keep a small [timeout](https://www.mindstick.com/forum/159429/sql-query-returns-a-timeout-expired-error) for normal pages (90 seconds or so), but allow for a larger timeout for [actions](https://www.mindstick.com/forum/156060/what-are-the-actions-performed-by-sql-server) where a user is uploading. This is just one [action](https://www.mindstick.com/forum/155752/what-is-action-result-with-its-types), so I don't mind putting code inside just that singular action rather than a generic solution.

Ultimately, a solution that would automatically [increase](https://www.mindstick.com/articles/12959/are-you-struggling-to-increase-the-profit-of-your-liquor-store) the timeout if Request.Files.Count > 0 would be the best.

## Replies

### Reply by Sumit Kesarwani

hi Ankit, \

you could try creating a location in your web.config and set the execution timeout for just your upload URL.

<location path="YourUrl">

<system.web>

<httpRuntime executionTimeout="9001"/>

</system.web>

</location>


---

Original Source: https://www.mindstick.com/forum/2139/upload-file-time-out

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
