Skip to content

Commit ed12f77

Browse files
authored
Merge pull request #17678 from dotnet/master
Update live with master
2 parents 72792e3 + bf6ca97 commit ed12f77

15 files changed

Lines changed: 66 additions & 34 deletions

File tree

aspnetcore/blazor/call-dotnet-from-javascript.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to invoke .NET methods from JavaScript functions in Blazo
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 03/24/2020
8+
ms.date: 04/07/2020
99
no-loc: [Blazor, SignalR]
1010
uid: blazor/call-dotnet-from-javascript
1111
---
@@ -352,6 +352,18 @@ window.updateMessageCallerJS = (dotnetHelper) => {
352352

353353
[!INCLUDE[Share interop code in a class library](~/includes/blazor-share-interop-code.md)]
354354

355+
## Avoid circular object references
356+
357+
Objects that contain circular references can't be serialized on the client for either:
358+
359+
* .NET method calls.
360+
* JavaScript method calls from C# when the return type has circular references.
361+
362+
For more information, see the following issues:
363+
364+
* [Circular references are not supported, take two (dotnet/aspnetcore #20525)](https://github.com/dotnet/aspnetcore/issues/20525)
365+
* [Proposal: Add mechanism to handle circular references when serializing (dotnet/runtime #30820)](https://github.com/dotnet/runtime/issues/30820)
366+
355367
## Additional resources
356368

357369
* <xref:blazor/call-javascript-from-dotnet>

aspnetcore/blazor/call-javascript-from-dotnet.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to invoke JavaScript functions from .NET methods in Blazo
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 02/19/2020
8+
ms.date: 04/07/2020
99
no-loc: [Blazor, SignalR]
1010
uid: blazor/call-javascript-from-dotnet
1111
---
@@ -454,6 +454,18 @@ For more information on resource exhaustion, see <xref:security/blazor/server>.
454454

455455
[!INCLUDE[Share interop code in a class library](~/includes/blazor-share-interop-code.md)]
456456

457+
## Avoid circular object references
458+
459+
Objects that contain circular references can't be serialized on the client for either:
460+
461+
* .NET method calls.
462+
* JavaScript method calls from C# when the return type has circular references.
463+
464+
For more information, see the following issues:
465+
466+
* [Circular references are not supported, take two (dotnet/aspnetcore #20525)](https://github.com/dotnet/aspnetcore/issues/20525)
467+
* [Proposal: Add mechanism to handle circular references when serializing (dotnet/runtime #30820)](https://github.com/dotnet/runtime/issues/30820)
468+
457469
## Additional resources
458470

459471
* <xref:blazor/call-dotnet-from-javascript>

aspnetcore/blazor/globalization-localization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to make Razor components accessible to users in multiple
55
monikerRange: '>= aspnetcore-3.1'
66
ms.author: riande
77
ms.custom: mvc
8-
ms.date: 04/02/2020
8+
ms.date: 04/07/2020
99
no-loc: [Blazor, SignalR]
1010
uid: blazor/globalization-localization
1111
---
@@ -154,7 +154,7 @@ The following component shows an example of how to perform the initial redirecti
154154
private void OnSelected(ChangeEventArgs e)
155155
{
156156
var culture = (string)e.Value;
157-
var uri = new Uri(NavigationManager.Uri())
157+
var uri = new Uri(NavigationManager.Uri)
158158
.GetComponents(UriComponents.PathAndQuery, UriFormat.Unescaped);
159159
var query = $"?culture={Uri.EscapeDataString(culture)}&" +
160160
$"redirectUri={Uri.EscapeDataString(uri)}";

aspnetcore/fundamentals/servers/kestrel.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,14 @@ webBuilder.ConfigureKestrel(serverOptions =>
339339

340340
The default value is 96 KB (98,304).
341341

342-
### Synchronous IO
342+
### Synchronous I/O
343343

344-
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous IO is allowed for the request and response. The default value is `false`.
344+
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous I/O is allowed for the request and response. The default value is `false`.
345345

346346
> [!WARNING]
347-
> A large number of blocking synchronous IO operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous IO.
347+
> A large number of blocking synchronous I/O operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous I/O.
348348
349-
The following example enables synchronous IO:
349+
The following example enables synchronous I/O:
350350

351351
[!code-csharp[](kestrel/samples/3.x/KestrelSample/Program.cs?name=snippet_SyncIO)]
352352

@@ -1320,14 +1320,14 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
13201320

13211321
The default value is 96 KB (98,304).
13221322

1323-
### Synchronous IO
1323+
### Synchronous I/O
13241324

1325-
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous IO is allowed for the request and response. The default value is `true`.
1325+
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous I/O is allowed for the request and response. The default value is `true`.
13261326

13271327
> [!WARNING]
1328-
> A large number of blocking synchronous IO operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous IO.
1328+
> A large number of blocking synchronous I/O operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous I/O.
13291329
1330-
The following example enables synchronous IO:
1330+
The following example enables synchronous I/O:
13311331

13321332
[!code-csharp[](kestrel/samples/2.x/KestrelSample/Program.cs?name=snippet_SyncIO)]
13331333

@@ -2177,14 +2177,14 @@ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21772177
});
21782178
```
21792179

2180-
### Synchronous IO
2180+
### Synchronous I/O
21812181

2182-
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous IO is allowed for the request and response. The default value is `true`.
2182+
<xref:Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerOptions.AllowSynchronousIO> controls whether synchronous I/O is allowed for the request and response. The default value is `true`.
21832183

21842184
> [!WARNING]
2185-
> A large number of blocking synchronous IO operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous IO.
2185+
> A large number of blocking synchronous I/O operations can lead to thread pool starvation, which makes the app unresponsive. Only enable `AllowSynchronousIO` when using a library that doesn't support asynchronous I/O.
21862186
2187-
The following example disables synchronous IO:
2187+
The following example disables synchronous I/O:
21882188

21892189
```csharp
21902190
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>

aspnetcore/fundamentals/target-aspnetcore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ If you can't rewrite the library, take the following steps:
201201
* Add a `<FrameworkReference>` element for the shared framework.
202202
* Use the [#if preprocessor directive](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if) with the appropriate target framework symbol to conditionally compile code.
203203

204-
For example, synchronous reads and writes on HTTP request and response streams are disabled by default as of ASP.NET Core 3.0. ASP.NET Core 2.2 supports the synchronous behavior by default. Consider a middleware library in which synchronous reads and writes should be enabled where IO is occurring. The library should enclose the code to enable synchronous features in the appropriate preprocessor directive. For example:
204+
For example, synchronous reads and writes on HTTP request and response streams are disabled by default as of ASP.NET Core 3.0. ASP.NET Core 2.2 supports the synchronous behavior by default. Consider a middleware library in which synchronous reads and writes should be enabled where I/O is occurring. The library should enclose the code to enable synchronous features in the appropriate preprocessor directive. For example:
205205

206206
[!code-csharp[](target-aspnetcore/samples/middleware.cs?highlight=9-24)]
207207

aspnetcore/grpc/browser.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ Alternatively, configure all services to support gRPC-Web by adding `services.Ad
4343

4444
[!code-csharp[](~/grpc/browser/sample/AllServicesSupportExample_Startup.cs?name=snippet_1&highlight=6,13)]
4545

46+
> [!NOTE]
47+
> There is a known issue that causes gRPC-Web to fail when [hosted by Http.sys](xref:fundamentals/servers/httpsys) in .NET Core 3.x.
48+
>
49+
> A workaround to get gRPC-Web working on Http.sys is available [here](https://github.com/grpc/grpc-dotnet/issues/853#issuecomment-610078202).
50+
4651
### gRPC-Web and CORS
4752

4853
Browser security prevents a web page from making requests to a different domain than the one that served the web page. This restriction applies to making gRPC-Web calls with browser apps. For example, a browser app served by `https://www.contoso.com` is blocked from calling gRPC-Web services hosted on `https://services.contoso.com`. Cross Origin Resource Sharing (CORS) can be used to relax this restriction.

aspnetcore/host-and-deploy/iis/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ services.Configure<IISServerOptions>(options =>
118118
| ------------------------------ | :-----: | ------- |
119119
| `AutomaticAuthentication` | `true` | If `true`, IIS Server sets the `HttpContext.User` authenticated by [Windows Authentication](xref:security/authentication/windowsauth). If `false`, the server only provides an identity for `HttpContext.User` and responds to challenges when explicitly requested by the `AuthenticationScheme`. Windows Authentication must be enabled in IIS for `AutomaticAuthentication` to function. For more information, see [Windows Authentication](xref:security/authentication/windowsauth). |
120120
| `AuthenticationDisplayName` | `null` | Sets the display name shown to users on login pages. |
121-
| `AllowSynchronousIO` | `false` | Whether synchronous IO is allowed for the `HttpContext.Request` and the `HttpContext.Response`. |
121+
| `AllowSynchronousIO` | `false` | Whether synchronous I/O is allowed for the `HttpContext.Request` and the `HttpContext.Response`. |
122122
| `MaxRequestBodySize` | `30000000` | Gets or sets the max request body size for the `HttpRequest`. Note that IIS itself has the limit `maxAllowedContentLength` which will be processed before the `MaxRequestBodySize` set in the `IISServerOptions`. Changing the `MaxRequestBodySize` won't affect the `maxAllowedContentLength`. To increase `maxAllowedContentLength`, add an entry in the *web.config* to set `maxAllowedContentLength` to a higher value. For more details, see [Configuration](/iis/configuration/system.webServer/security/requestFiltering/requestLimits/#configuration). |
123123

124124
**Out-of-process hosting model**

aspnetcore/includes/MTcomments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
If you are reading this in a language other than English, let us know in this [GitHub discussion issue](https://github.com/aspnet/AspNetCore.Docs/issues/16455) if youd like to see the code comments in your native language.
1+
If you are reading this in a language other than English, let us know in this [GitHub discussion issue](https://github.com/aspnet/AspNetCore.Docs/issues/16455) if you'd like to see the code comments in your native language.

aspnetcore/migration/22-to-30.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,9 @@ For more information, see [Put request trailers in a separate collection (dotnet
408408

409409
### AllowSynchronousIO disabled
410410

411-
`AllowSynchronousIO` enables or disables synchronous IO APIs, such as `HttpRequest.Body.Read`, `HttpResponse.Body.Write`, and `Stream.Flush`. These APIs are a source of thread starvation leading to app crashes. In 3.0, `AllowSynchronousIO` is disabled by default. For more information, see [the Synchronous IO section in the Kestrel article](/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.0#synchronous-io).
411+
`AllowSynchronousIO` enables or disables synchronous I/O APIs, such as `HttpRequest.Body.Read`, `HttpResponse.Body.Write`, and `Stream.Flush`. These APIs are a source of thread starvation leading to app crashes. In 3.0, `AllowSynchronousIO` is disabled by default. For more information, see [the Synchronous I/O section in the Kestrel article](/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-3.0#synchronous-io).
412412

413-
If synchronous IO is needed, it can be enabled by configuring the `AllowSynchronousIO` option on the server being used (when calling `ConfigureKestrel`, for example, if using Kestrel). Note that servers (Kestrel, HttpSys, TestServer, etc.) all have their own `AllowSynchronousIO` option that won't affect other servers. Synchronous IO can be enabled for all servers on a per-request basis using the `IHttpBodyControlFeature.AllowSynchronousIO` option:
413+
If synchronous I/O is needed, it can be enabled by configuring the `AllowSynchronousIO` option on the server being used (when calling `ConfigureKestrel`, for example, if using Kestrel). Note that servers (Kestrel, HttpSys, TestServer, etc.) all have their own `AllowSynchronousIO` option that won't affect other servers. Synchronous I/O can be enabled for all servers on a per-request basis using the `IHttpBodyControlFeature.AllowSynchronousIO` option:
414414

415415
```csharp
416416
var syncIOFeature = HttpContext.Features.Get<IHttpBodyControlFeature>();

aspnetcore/mvc/controllers/routing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ The following example uses attribute routing:
677677

678678
The `Source` action in the preceding code generates `custom/url/to/destination`.
679679

680-
<xref:Microsoft.AspNetCore.Routing.LinkGenerator> was added in ASP.NET Core 3.0 as an alternative to `IUrlHelper`. `LinkGenerator` offers similar but more flexible functionality. Each other the methods on `IUrlHelper` has a corresponding family of methods on `LinkGenerator` as well.
680+
<xref:Microsoft.AspNetCore.Routing.LinkGenerator> was added in ASP.NET Core 3.0 as an alternative to `IUrlHelper`. `LinkGenerator` offers similar but more flexible functionality. Each method on `IUrlHelper` has a corresponding family of methods on `LinkGenerator` as well.
681681

682682
### Generating URLs by action name
683683

0 commit comments

Comments
 (0)