How to run a task on Azure c# that runs more than 5 minutes?

Is Web API in C#, it must make a request to the database to execute the procedure with the return response. But the procedure is more than 5 minutes and the standby time ends. How can I bypass this restriction?
Found a variant with WebJobs as it correctly to implement? How to write, to add and run through the code?

Just starting to understand C# and Azure work the first time, the client access server does not work via git, Visual Studio, and Microsoft SQL Server Management Studio.
March 23rd 20 at 18:52
1 answer
March 23rd 20 at 18:54
Maybe we should change the logic and make asynchrony request?
1. The request is made. On the server an entry is placed in the queue and returns the ID of the operation.
2. and. The user after some interval requests the status of the operation.
or b. There is a WebSocket connection which returns a notification cluding query.
3. Requested the result of the operation.
Thanks for the comment!
1) the Request is made asynchronously with the front of the application to the Web API
2) Web API makes a request to SQL Server (it works out there for about 7-10 minutes)
3) After 4-5 minutes the Web API returns to the application 502

You mean to make an asynchronous request from Web API to SQL Server? How can it be done? Web API, as I wrote above, C# on Azure server - Lourdes.Zulauf commented on March 23rd 20 at 18:57
@Lourdes.Zulauf, From the front short queries. 1. Start. 2. Status check. 3. Retrieving the result.
On the server the query runs in a separate thread, not in that responds to requests from the front. - gail.Zula commented on March 23rd 20 at 19:00

Find more questions by tags Microsoft AzureC#