HostingExtensions.AddDnsSrvServiceEndPointResolver Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds DNS SRV service discovery to the IServiceCollection.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddDnsSrvServiceEndPointResolver (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.ServiceDiscovery.Dns.DnsSrvServiceEndPointResolverOptions>? configureOptions = default);
static member AddDnsSrvServiceEndPointResolver : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.ServiceDiscovery.Dns.DnsSrvServiceEndPointResolverOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddDnsSrvServiceEndPointResolver (services As IServiceCollection, Optional configureOptions As Action(Of DnsSrvServiceEndPointResolverOptions) = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The service collection.
- configureOptions
- Action<DnsSrvServiceEndPointResolverOptions>
The DNS SRV service discovery configuration options.
Remarks
DNS SRV queries are able to provide port numbers for endpoints and can support multiple named endpoints per service. However, not all environment support DNS SRV queries, and in some environments, additional configuration may be required.
Applies to
Feedback
Submit and view feedback for