M
M
Master_Dante2017-10-12 13:44:58
ASP.NET
Master_Dante, 2017-10-12 13:44:58

How to catch shutdown event on ASP.Net Core 2.0?

The solution from the first version does not fit.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
akass, 2017-10-12
@akass

public void Configure(IApplicationBuilder app, IHostingEnvironment env, IApplicationLifetime lifetime)
        {
            lifetime.ApplicationStopped.Register(() =>
            {
                Console.WriteLine("Stopped");
            });
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question