diff --git a/aspnetcore/blazor/components/js-spa-frameworks.md b/aspnetcore/blazor/components/js-spa-frameworks.md index 8ed649c40d07..fe7dcf9dd149 100644 --- a/aspnetcore/blazor/components/js-spa-frameworks.md +++ b/aspnetcore/blazor/components/js-spa-frameworks.md @@ -49,7 +49,7 @@ The following example demonstrates the dynamic registration of the preceding `Qu :::moniker range=">= aspnetcore-8.0" -* In a Blazor Web App app, modify the call to in the server-side `Program` file: +* In a Blazor Web App app, modify the call to in the server-side `Program` file: ```csharp builder.Services.AddRazorComponents() @@ -228,7 +228,7 @@ Add a package reference for [`Microsoft.AspNetCore.Components.CustomElements`](h ### Blazor Web App registration -To register a root component as a custom element in a Blazor Web App, modify the call to in the server-side `Program` file. The following example registers the `Counter` component with the custom HTML element `my-counter`: +To register a root component as a custom element in a Blazor Web App, modify the call to in the server-side `Program` file. The following example registers the `Counter` component with the custom HTML element `my-counter`: + +The approach described in this article is used by the *experimental* [`Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package (NuGet.org)](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle) for .NET 6 and 7 apps. The package contains MSBuild targets to customize the Blazor publish output and a [JavaScript initializer](xref:blazor/js-interop/index#javascript-initializers) to use a custom [boot resource loader](xref:blazor/fundamentals/startup#load-boot-resources), each of which are described in detail later in this article. [Experimental code (includes the NuGet package reference source and `CustomPackagedApp` sample app)](https://github.com/aspnet/AspLabs/tree/main/src/BlazorWebAssemblyCustomInitialization) > [!WARNING] -> Experimental and preview features are provided for the purpose of collecting feedback and aren't supported for production use. For more information and to provide feedback to the ASP.NET Core product unit, see [Consider releasing a supported version of `Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` (dotnet/aspnetcore #36978)](https://github.com/dotnet/aspnetcore/issues/36978). +> Experimental and preview features are provided for the purpose of collecting feedback and aren't supported for production use. Later in this article, the [Customize the Blazor WebAssembly loading process via a NuGet package](#customize-the-blazor-webassembly-loading-process-via-a-nuget-package) section with its three subsections provide detailed explanations on the configuration and code in the `Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package. The detailed explanations are important to understand when you create your own strategy and custom loading process for Blazor WebAssembly apps. To use the published, experimental, unsupported NuGet package without customization as a **local demonstration**, perform the following steps: @@ -60,7 +57,7 @@ Later in this article, the [Customize the Blazor WebAssembly loading process via ## Customize the Blazor WebAssembly loading process via a NuGet package > [!WARNING] -> The guidance in this section with its three subsections pertains to building a NuGet package from scratch to implement your own strategy and custom loading process. The *experimental* [`Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package (NuGet.org)](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle) is based on the guidance in this section. When using the provided package in a **local demonstration** of the multipart bundle download approach, you don't need to follow the guidance in this section. For guidance on how to use the provided package, see the [Experimental NuGet package and sample app](#experimental-nuget-package-and-sample-app) section. +> The guidance in this section with its three subsections pertains to building a NuGet package from scratch to implement your own strategy and custom loading process. The *experimental* [`Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle` package (NuGet.org)](https://www.nuget.org/packages/Microsoft.AspNetCore.Components.WebAssembly.MultipartBundle) for .NET 6 and 7 is based on the guidance in this section. When using the provided package in a **local demonstration** of the multipart bundle download approach, you don't need to follow the guidance in this section. For guidance on how to use the provided package, see the [Experimental NuGet package and sample app](#experimental-nuget-package-and-sample-app) section. Blazor app resources are packed into a multipart bundle file and loaded by the browser via a custom [JavaScript (JS) initializer](xref:blazor/js-interop/index#javascript-initializers). For an app consuming the package with the JS initializer, the app only requires that the bundle file is served when requested. All of the other aspects of this approach are handled transparently. diff --git a/aspnetcore/blazor/project-structure.md b/aspnetcore/blazor/project-structure.md index 62cc434d9020..21e2c4ce1f23 100644 --- a/aspnetcore/blazor/project-structure.md +++ b/aspnetcore/blazor/project-structure.md @@ -58,8 +58,8 @@ For more information, see . * `wwwroot` folder: The [Web Root](xref:fundamentals/index#web-root) folder for the server project containing the app's public static assets. * `Program.cs` file: The server project's entry point that sets up the ASP.NET Core web application [host](xref:fundamentals/host/generic-host#host-definition) and contains the app's startup logic, including service registrations, configuration, logging, and request processing pipeline. - * Services for Razor components are added by calling . adds services to support rendering interactive server components. - * discovers available components and specifies the root component for the app, which by default is the `App` component (`App.razor`). configures the Server render mode for the app. + * Services for Razor components are added by calling . adds services to support rendering interactive server components. + * discovers available components and specifies the root component for the app, which by default is the `App` component (`App.razor`). configures the Server render mode for the app. * App settings files (`appsettings.Development.json`, `appsettings.json`): Provide [configuration settings](xref:blazor/fundamentals/configuration) for the server project. diff --git a/aspnetcore/grpc/aspnetcore.md b/aspnetcore/grpc/aspnetcore.md index 235850707409..191f188aa3fd 100644 --- a/aspnetcore/grpc/aspnetcore.md +++ b/aspnetcore/grpc/aspnetcore.md @@ -260,6 +260,7 @@ You can add a gRPC server to non-ASP.NET Core projects with the following projec The preceding project file: +* Doesn't use `Microsoft.NET.SDK.Web` as the SDK. * Adds a framework reference to `Microsoft.AspNetCore.App`. * The framework reference allows non-ASP.NET Core apps, such as Windows Services, WPF apps, or WinForms apps to use ASP.NET Core APIs. * The app can now use ASP.NET Core APIs to start an ASP.NET Core server. @@ -268,6 +269,7 @@ The preceding project file: * `.proto` file. For more information about using the `Microsoft.AspNetCore.App` framework reference, see [Use the ASP.NET Core shared framework](xref:fundamentals/target-aspnetcore#use-the-aspnet-core-shared-framework). + ## Integration with ASP.NET Core APIs gRPC services have full access to the ASP.NET Core features such as [Dependency Injection](xref:fundamentals/dependency-injection) (DI) and [Logging](xref:fundamentals/logging/index). For example, the service implementation can resolve a logger service from the DI container via the constructor: diff --git a/aspnetcore/grpc/migration.md b/aspnetcore/grpc/migration.md index 65e43d888b69..19b1d4a5f50f 100644 --- a/aspnetcore/grpc/migration.md +++ b/aspnetcore/grpc/migration.md @@ -113,6 +113,14 @@ ASP.NET Core [middleware](xref:fundamentals/middleware/index) offers similar fun For more information on how these features compare to each other, see [gRPC Interceptors versus Middleware](xref:grpc/interceptors#grpc-interceptors-versus-middleware). +## Host gRPC in non-ASP.NET Core projects + +A C-core-based server can be added to any project type. gRPC for .NET server requires ASP.NET Core. ASP.NET Core is usually available because the project file specifies `Microsoft.NET.SDK.Web` as the SDK. + +A gRPC server can be hosted to non-ASP.NET Core projects by adding `` to a project. The framework reference makes ASP.NET Core APIs available and they can be used to start an ASP.NET Core server. + +For more information, see [Host gRPC in non-ASP.NET Core projects](xref:grpc/aspnetcore#host-grpc-in-non-aspnet-core-projects). + ## Additional resources * diff --git a/aspnetcore/introduction-to-aspnet-core.md b/aspnetcore/introduction-to-aspnet-core.md index 2636b93a3723..50ba190bee0a 100644 --- a/aspnetcore/introduction-to-aspnet-core.md +++ b/aspnetcore/introduction-to-aspnet-core.md @@ -204,7 +204,7 @@ To change the sample to run the `ExpandDefault` scenario, define the `ExpandDefa For more information on using [C# preprocessor directives](/dotnet/csharp/language-reference/preprocessor-directives/) to selectively compile sections of code, see [#define (C# Reference)](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-define) and [#if (C# Reference)](/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if). -### Regions in sample code + ## Breaking changes and security advisories diff --git a/aspnetcore/security/authentication/azure-ad-b2c.md b/aspnetcore/security/authentication/azure-ad-b2c.md index 2291db80b188..83ef19bd9f12 100644 --- a/aspnetcore/security/authentication/azure-ad-b2c.md +++ b/aspnetcore/security/authentication/azure-ad-b2c.md @@ -17,7 +17,7 @@ By [Damien Bod](https://twitter.com/damien_bod) > Microsoft Entra ID (previously known as Azure AD) and Azure AD B2C are separate product offerings. An Entra ID tenant generally represents an organization, while an Azure AD B2C tenant represents a collection of identities to be used with relying party applications. To learn more, see [Azure AD B2C: Frequently asked questions (FAQ)](/azure/active-directory-b2c/active-directory-b2c-faqs). > [!TIP] -> [Microsoft Entra External ID for customers](/azure/active-directory/external-identities/customers/overview-customers-ciam) is Microsoft’s new customer identity and access management (CIAM) solution +> [Microsoft Entra External ID for customers](/azure/active-directory/external-identities/customers/overview-customers-ciam) is Microsoft’s new customer identity and access management (CIAM) solution. In this tutorial, you'll learn how to configure an ASP.NET Core app for authentication with Azure AD B2C. @@ -41,7 +41,7 @@ In this tutorial, you'll learn how to configure an ASP.NET Core app for authenti > You may prefer to [use Visual Studio to create your app](/visualstudio/ide/quickstart-aspnet-core). 1. [Create a web app registration in the tenant](/azure/active-directory-b2c/tutorial-register-applications#register-a-web-application). For **Redirect URI**, use `https://localhost:5001/signin-oidc`. Replace `5001` with the port used by your app when using Visual Studio generated ports. - + ## Modify the app 1. Add the `Microsoft.Identity.Web` and `Microsoft.Identity.Web.UI` packages to the project. If you're using Visual Studio, you can use [NuGet Package Manager](/nuget/consume-packages/install-use-packages-visual-studio).