Skip to content

Commit 4b593c0

Browse files
Merge pull request #34003 from dotnet/main
Merge to Live
2 parents a6730aa + 39324ff commit 4b593c0

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

aspnetcore/grpc/code-first.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ A code-first gRPC client uses the service contract to call gRPC services.
8989
* Add a [Grpc.Net.Client](https://www.nuget.org/packages/Grpc.Net.Client) package reference.
9090
* Add a reference to the shared code-contract project.
9191

92-
[!code-csharp[](code-first/samples/6.x/GrpcGreeterClient/GrpcGreeterClient.csproj?highlight=10-13,15-17)]
93-
94-
[!code-xml[](code-first/samples/6.x/GrpcGreeterClient/GrpcGreeterClient.csproj?highlight=10-13,15-17)]
92+
[!code-xml[](code-first/samples/6.x/GrpcGreeterClient/GrpcGreeterClient.csproj?highlight=10-13,15-17)]
9593

9694
* Update the client `program.cs`
9795

aspnetcore/migration/80-90.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,29 @@ In the project file, update each [`Microsoft.AspNetCore.*`](https://www.nuget.or
6363
- <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.2" />
6464
- <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
6565
- <PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
66-
+ <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.0-preview.1.24081.5" />
67-
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0-preview.1.24081.2" />
68-
+ <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0-preview.1.24080.9" />
69-
+ <PackageReference Include="System.Net.Http.Json" Version="9.0.0-preview.1.24080.9" />
66+
+ <PackageReference Include="Microsoft.AspNetCore.JsonPatch" Version="9.0.0" />
67+
+ <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0" />
68+
+ <PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.0" />
69+
+ <PackageReference Include="System.Net.Http.Json" Version="9.0.0" />
7070
</ItemGroup>
7171
```
7272

73+
## Replace UseStaticFiles with MapStaticAssets
74+
75+
Blazor has different update instructions for `MapStaticAssets` than Razor Pages and ASP.NET Core MVC.
76+
77+
### Blazor web apps
78+
79+
* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs`
80+
* Update explicit references to static assets in `.razor` files to use the `@Assets["asset-path"]` API. This should ***NOT*** be done for the Blazor framework scripts (`*blazor.\*.js*`).
81+
* Update the root `App.razor` component to include the `<ImportMap />` component in the head.
82+
83+
### Razor Pages and ASP.NET Core MVC based apps
84+
85+
* Replace [UseStaticFiles](/dotnet/api/microsoft.aspnetcore.builder.staticfileextensions.usestaticfiles) with [MapStaticAssets](/dotnet/api/microsoft.aspnetcore.builder.staticassetsendpointroutebuilderextensions.mapstaticassets) in `Program.cs`
86+
* Chain a call to `.WithStaticAssets` after `MapRazorPages` or `MapControllerRoute` in `Program.cs`. For an example, see the <xref:fundamentals/static-files?view=aspnetcore-9.0&preserve-view=true>
87+
* Add `<script type="importmap"></script>` to the head of the main layout file.
88+
7389
## Blazor
7490

7591
[!INCLUDE[](~/migration/80-to-90/includes/blazor.md)]

aspnetcore/security/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ Managed identities are a secure way to authenticate to services without needing
6161
* [Managed identities for App Service and Azure Functions](/azure/app-service/overview-managed-identity)
6262
* [Secure authentication flows](/entra/identity-platform/authentication-flows-app-scenarios#web-app-that-signs-in-a-user)
6363

64-
When the app is deployed to a test server, an environment variable can be used to set the connection string to a test database server. For more information, see [Configuration](xref:fundamentals/configuration/index). Environment variables are generally stored in plain, unencrypted text. If the machine or process is compromised, environment variables can be accessed by untrusted parties. We recommend environment variables not be used to store a production connection string as it's not the most secure approach.
64+
When the app is deployed to a test server, an environment variable can be used to set the connection string to a test database server. For more information, see [Configuration](xref:fundamentals/configuration/index). Environment variables are generally stored in plain, unencrypted text. If the machine or process is compromised, environment variables can be accessed by untrusted parties. We recommend against using environment variables to store a production connection string as it's not the most secure approach.
65+
66+
Configuration data guidelines:
67+
68+
* Never store passwords or other sensitive data in configuration provider code or in plain text configuration files. The [Secret Manager](xref:security/app-secrets) tool can be used to store secrets in development.
69+
* Don't use production secrets in development or test environments.
70+
* Specify secrets outside of the project so that they can't be accidentally committed to a source code repository.
6571

6672
Configuration data guidelines:
6773

0 commit comments

Comments
 (0)