Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

IHostedServices and site IP address

$
0
0

With .NET Core 2.1 and ASP.NET Core, you can have multiple IHostedServices running at the same time as the WebHost.

How would you determine the IP address that the WebSite is bound too from one of the other HostedServices?

I'd like to start a separate background service (IHostedService) that is used as a discovery service (SSDP), but need to know the IP address. Hardcoding the address NOT an option. I want to use whatever the web site is bound too.


Viewing all articles
Browse latest Browse all 9386

Trending Articles