Asp.Net Core 2.2 graceful shutdown mechanism

Dear developers,

I would like you to develop the mechanism to implement a graceful shutdown of Asp.Net Core 2.2 applications.

It should implement the IApplicationLifetime callbacks, and cancellation tokens.

To show it working properly, I would like you to create a Controller which uses a EFCore 2.2 database context and performs a long running operation on it (obviously passing the cancellation token). Alternatively you may do a HttpClient request to download a big quantity of data from somewhere, passing the cancellation token.

The mechanism should properly finalize execution of the database operation or download, then log a message on the console in the ApplicationStopping event, and only quit the application after logging a message on the console in the ApplicationStopped event as well.

To do this cleanly I suggest createing a base controller, derived from ControllerBase, which implements everything needed to work with the cancellation token from IApplicationLifetime. You then inherit your Controller from this base controller.


- Visual Studio 2017/2019 Solution with 1 AspNet Core 2.2 project.


Thanks for bidding.

Skills: .NET, ASP.NET, C# Programming, Microsoft SQL Server, SQL

See more: core cancellationtoken, asp net core iis shutdown, applicationstopping, iapplicationlifetime stopapplication, core graceful shutdown, core "application is shutting down", useurls core, ihostedservice, core 2 react, core 2.0 spa, core 2.0 react tutorial, core 2 tutorial, core 2.0 mvc, core 2.0 tutorial, core 2.0 webpack, core 2.0 download, core 2 with vue, core 2.0 authentication, core 2.0 identity, asp net core - angular 2 - web api e-commerce app

About the Employer:
( 19 reviews ) São Paulo, Brazil

Project ID: #19616583

Awarded to:


Good afternoon. Accept the work with pleasure, I just need you to give me more specific indications about what you want to do in the application.

$20 USD in 7 days
(0 Reviews)

2 freelancers are bidding on average $18 for this job


Hi. Glad to see you I read your job detail carefully and understand what you want. I have been developing .NET web and desktop app for 7 years and I have rich experience in ASP.NET I have developed many websites with More

$15 USD in 7 days
(4 Reviews)