Lookup a domain name and DNS record type.
Namespace:
JHSoftwareAssembly: JHSoftware.DnsClient (in JHSoftware.DnsClient.dll) Version: 1.0.1.0 (1.0.1.0)
Syntax
| C# |
|---|
public static DnsClient..::.Response Lookup( string domainName, DnsClient..::.RecordType queryType, DnsClient..::.RequestOptions options ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function Lookup ( _ domainName As String, _ queryType As DnsClient..::.RecordType, _ options As DnsClient..::.RequestOptions _ ) As DnsClient..::.Response |
Parameters
- domainName
- Type: System..::.String
The domain name to look up. IDNs may be either in native or encoded form (xn--...).
- queryType
- Type: JHSoftware..::.DnsClient..::.RecordType
The record type to look up.
- options
- Type: JHSoftware..::.DnsClient..::.RequestOptions
The options to use with the DNS request.
Return Value
A Response object containing DNS response records and properties.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentException | Invalid domain name or query type. |
| JHSoftware..::.DnsClient..::.NoDnsServersException | No DNS servers where specified, and no DNS servers could be found in this computer's IP configuration |
| JHSoftware..::.DnsClient..::.NXDomainException | The requested domain name does not exist (DNS server returned RCode 3 NXDomain). |
| JHSoftware..::.DnsClient..::.NoDataException | The requested domain name exists but has no records of the requested type. |
| JHSoftware..::.DnsClient..::.NoDefinitiveAnswerException | None of the DNS servers returned a definitive answer. |