# ASP.Net MVC 5.2.3 - Long-running task gets cancelled

**URL:** <https://discuss.hangfire.io/t/asp-net-mvc-5-2-3-long-running-task-gets-cancelled/3985>\
**Category:** question\
**Tags:** sql-server, long-running\
**Created:** [November 1, 2017, 2:26pm UTC](https://discuss.hangfire.io/t/asp-net-mvc-5-2-3-long-running-task-gets-cancelled/3985 "2017-11-01T14:26:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![omon77](https://dub1.discourse-cdn.com/flex017/user_avatar/discuss.hangfire.io/omon77/32/1143_2.png) [@omon77](https://discuss.hangfire.io/u/omon77)\
**Post date:** [November 1, 2017, 2:26pm UTC](https://discuss.hangfire.io/t/asp-net-mvc-5-2-3-long-running-task-gets-cancelled/3985/1 "2017-11-01T14:26:48Z")

</div>

Hello, I have an [ASP.Net](http://ASP.Net) MVC 5.2.3 application that has a need to offload the long-running task.  
I am in the process of evaluating Hangfire for this task, but can’t get the long-running task run through completion. It gets cancelled after about 1.5-2 minutes and gets retried again. That is while debugging in VS2017 using development server.

The use case:  
posts a request, if the the processing needs to be done in the background, kick the long-running process off in the background, return view stating that the processing is done in the background.

The long-running task does the following:

- calls a web-service asynchronously (could be 10-15 minutes), await result
- generates spreadsheet from the result
- emails the spreadsheet

Does anyone have any input on what am I missing?
