You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/diagnostics/asp0028.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ uid: diagnostics/asp0028
17
17
18
18
## Cause
19
19
20
-
`IPv6Any` is preferred to `Any` because `Any` is less performant than `IPv6Any`. In some cases, `Any` may not work at all. `Any` has performance problems due to the [underlying System types implementation](https://github.com/dotnet/runtime/issues/82404).
20
+
[IPv6Any](/dotnet/api/system.net.ipaddress.ipv6any) is preferred to [Any](/dotnet/api/system.net.ipaddress.any) because `Any` is less performant than `IPv6Any`. In some cases, `Any` may not work at all. `Any` has performance problems due to the [underlying System types implementation](https://github.com/dotnet/runtime/issues/82404).
21
21
22
22
`127.0.0.1` is the IPv4 loopback address. `::1` is the IPv6 loopback address. `Any` is the wildcard address for IPv4. `IPv6Any` is the wildcard address for IPv6.
23
23
@@ -26,7 +26,7 @@ Current behavior with with IPv6 when using HTTP/1.x or HTTP/2.0:
26
26
*`localhost` resolves to `[::1]`.
27
27
*`[::1]` isn't accepted by the server, which forces a retry using `127.0.0.1`, creating a repeated cycle.
28
28
29
-
Using `Any` with the preceding conditions is reported with a diagnostic message:
29
+
Using `Any` with the preceding conditions reports the `ASP0028` diagnostic message:
30
30
31
31
```csharp
32
32
.UseKestrel().ConfigureKestrel(options=>
@@ -51,7 +51,7 @@ For the problematic code, replace `Any` with `IPv6Any`:
51
51
})
52
52
```
53
53
54
-
Alternatively, use the `ListenAnyIP` method without specifying any argument:
54
+
Alternatively, use the [ListenAnyIP](https://source.dot.net/#Microsoft.AspNetCore.Server.Kestrel.Core/KestrelServerOptions.cs,1c84a7db2c1f6892) method without specifying any argument:
55
55
56
56
```diff
57
57
.UseKestrel().ConfigureKestrel(options =>
@@ -63,6 +63,6 @@ Alternatively, use the `ListenAnyIP` method without specifying any argument:
63
63
64
64
## When to suppress warnings
65
65
66
-
The `ASP0028` diagnostic has a Information level severity. Suppress warnings if your intention is to disable `IPv6` usage completely on the server, although this comes with the risk of the performance problems mentions in this article
66
+
The `ASP0028` diagnostic has a Information level severity. Suppress warnings if your intention is to disable `IPv6` usage completely on the server, although doing so risks the performance problems mentioned in this article.
67
67
68
68
`IPv6` can be disabled either system-wide, or for .NET only via the [AppCtx switch or environment variable](https://devblogs.microsoft.com/dotnet/dotnet-6-networking-improvements/#an-option-to-globally-disable-ipv6)
0 commit comments