Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using Async Task in my application and i want to increase the time of async task so that the the task can be completed before time out can anybody know how can i increase the value of default time out ?

What I have tried:

i want to upload the video's by Using YouTube Data API and i already customize the max upload size of video and execution run time of process but when i upload the video having size more then 10 MB that it shows error of time out of specific task can any body tells how i can maximize the value of Async Task ?
Posted
Updated 24-Mar-16 2:47am
Comments
FARONO 24-Mar-16 5:02am    
I don't think Async task hás a timeout? Isn't something else causing the timeout?
arslan afzal bhatti 24-Mar-16 5:05am    
don't know but according to me it is Task time out!
FARONO 24-Mar-16 5:59am    
Task itself has no Timeout, you specifically have to implement a 'wait' to check the state. The code within the task can maybe cause the timeout?

1 solution

The default timeout for async actions is 45 seconds. To override that, add the AsyncTimeout attribute[^] to your action:
C#
[AsyncTimeout(60000)]
public async Task<ActionResult> YourAction()
{
   ...
}

If you want your action to never time out, you can use the NoAsyncTimeout attribute[^], or pass -1 to the AsyncTimeout constructor.
 
Share this answer
 
Comments
arslan afzal bhatti 28-Mar-16 3:05am    
ok this work's thanks for your concern

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900