1

When debugging async services, in Visual Studio 2017, frequently the calling app somehow times out and returns "A Task was cancelled" error - when really I'm just taking too long debugging.

Is there any way to extend the timeout or suspend cancelling tasks when debugging?

I'm running a web app, async calling a separate rest service. Two visual studio solutions open, debugging from the web app solution steps straight into the other solution no problem - but the first solution raises the "Task Cancelled" error after about 5 minutes.

TomFp
  • 469
  • 1
  • 5
  • 13

1 Answers1

0

In your web.config, make sure you have the following fields:

<compilation debug="true" targetFramework="4.6.1" />
<httpRuntime targetFramework="4.6.1" executionTimeout="1" />

Small explanation, the executionTimeout is by seconds and will only work if debug=false, if the debug in compilation is true then the executionTimeout is useless and it becomes max. Check the following answer for further explaining.

Ali_Nass
  • 838
  • 1
  • 9
  • 27