Posts

Showing posts with the label Windows Service

Running an Asp.Net Core 2.* Web API as a Windows Service

Image
At my current workplace there is a healthy hunger for new technologies and a pragmatic view of the software industry in our corner of the planet. As a Microsoft driven shop, previous reservations of moving to different ecosystems and operating systems have melted away with the arrival and wide adoption of .Net Core. After all the language is the same. The developers need "only" to catch up on their containers. When I joined a month ago as a tech lead, little did I know that putting my money where my mouth is would mean having to deal with outdated Microsoft documentation or even S.O answers to questions such as "How do I run an Asp.Net Core app as a windows service without IIS". TL;DR add a reference to the NuGet package  Microsoft.Aspnetcore.Hosting.Windowsservices , publish and register your executable as a service. A Prophecy? Almost a year ago I wrote a blog post about porting  full framework projects to core . Ever since I have written my share of .Net Cor