Skip to content

Commit 4e15fe5

Browse files
committed
edit asp0028 /1
1 parent 17268a4 commit 4e15fe5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aspnetcore/diagnostics/asp0028.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ uid: diagnostics/asp0028
1717

1818
## Cause
1919

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).
2121

2222
`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.
2323

@@ -26,7 +26,7 @@ Current behavior with with IPv6 when using HTTP/1.x or HTTP/2.0:
2626
* `localhost` resolves to `[::1]`.
2727
* `[::1]` isn't accepted by the server, which forces a retry using `127.0.0.1`, creating a repeated cycle.
2828

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:
3030

3131
```csharp
3232
.UseKestrel().ConfigureKestrel(options =>
@@ -51,7 +51,7 @@ For the problematic code, replace `Any` with `IPv6Any`:
5151
})
5252
```
5353

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:
5555

5656
```diff
5757
.UseKestrel().ConfigureKestrel(options =>
@@ -63,6 +63,6 @@ Alternatively, use the `ListenAnyIP` method without specifying any argument:
6363

6464
## When to suppress warnings
6565

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.
6767

6868
`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

Comments
 (0)