Info
Version: | 1.0.5 |
Author(s): | JorJika |
Last Update: | Saturday, August 11, 2018 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://jorjika.net/ |
NuGet Url: | https://www.nuget.org/packages/JorJika.Api.WindowsService.DotNetCore |
Install
Install-Package JorJika.Api.WindowsService.DotNetCore
dotnet add package JorJika.Api.WindowsService.DotNetCore
paket add JorJika.Api.WindowsService.DotNetCore
JorJika.Api.WindowsService.DotNetCore Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNetCore(>= 2.1.2)
- Microsoft.AspNetCore.Hosting.WindowsServices(>= 2.1.1)
- System.ServiceProcess.ServiceController(>= 4.5.0)
With your self contained build for Win64 you are able to Install and run your Api as Windows service, Self host with double click or even host in IIS proxy. One build does everything.
Usage =>
Use following code in Program.cs:
public static void Main(string[] args)
{
WebHostTools.Run<Startup>(args);
}
It will bind local ip address from first adapter and use port 5300.
You can change these passing additional parameters after "args" parameter.