Restart Kestrel in Memory

Viewed 127

I have an instance of Microsoft.AspNetCore.Hosting.IWebHost created using Microsoft.AspNetCore.WebHost.CreateDefaultBuilder().

This may be a stupid question but I can't seem to find a straightforward way to call IWebHost.StopAsync() then IWebHost.StartAsync() to basically restart the server in memory without a full process restart.

I keep getting System.InvalidOperationException: Server has already started.

Thanks in advance.

0 Answers
Related