Skip to content

Commit affa4e7

Browse files
committed
fixes
1 parent 447284f commit affa4e7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/azure/sdk/aspnetcore-guidance.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ASP.NET Core apps that connect to Azure services generally depend on the followi
2525

2626
In the sections ahead, you'll explore how to implement these libraries in an ASP.NET Core app.
2727

28-
## Register service clients
28+
## Register Azure SDK clients with the DI service collection
2929

3030
The Azure SDK for .NET client libraries provide service clients to connect your app to Azure services such as Azure Blob Storage and Azure Key Vault. Register these services with the dependency container in the `Program.cs` file of your app to make them available via [dependency injection](/aspnet/core/fundamentals/dependency-injection).
3131

@@ -76,9 +76,9 @@ Use the [Azure Identity](/dotnet/api/overview/azure/identity-readme) library for
7676
7777
1. Add the [Azure.Identity](https://www.nuget.org/packages/Azure.Identity) package:
7878
79-
```dotnetcli
80-
dotnet add package Azure.Identity
81-
```
79+
```dotnetcli
80+
dotnet add package Azure.Identity
81+
```
8282
8383
1. In the `Program.cs` file of your app, invoke the `UseCredential` extension method from the `Microsoft.Extensions.Azure` library to set a shared `DefaultAzureCredential` instance for all registered Azure service clients:
8484
@@ -88,7 +88,7 @@ dotnet add package Azure.Identity
8888
8989
## Apply configurations
9090
91-
Azure SDK service clients support configurations to change their default behaviors. There are two ways to configure service clients:
91+
Azure SDK service clients support configurations to change their default behaviors. `IConfiguration` precedence rules are respected by the `Microsoft.Extensions.Azure` extension methods, which are detailed in the [Configuration Providers](/dotnet/core/extensions/configuration#configuration-providers) documentation. There are two ways to configure service clients:
9292
9393
- [JSON configuration files](/dotnet/core/extensions/configuration-providers#json-configuration-provider) are generally the recommended approach because they simplify managing differences in app deployments between environments.
9494
- Inline code configurations can be applied when you register the service client. For example, in the [Register clients and subclients](#register-service-clients) section, you explicitly passed the URI variables to the client constructors.
@@ -124,7 +124,7 @@ You may want to change default Azure client configurations globally or for a spe
124124
125125
## Configure logging
126126
127-
The Azure SDK for .NET client libraries can log client library operations to monitor requests and responses to Azure services. When you register an Azure SDK client using the <xref:Microsoft.Extensions.Azure.AzureClientServiceCollectionExtensions.AddAzureClients%2A> extension method, the <xref:Microsoft.Extensions.Azure.AzureEventSourceLogForwarder> is registered with the dependency injection container. This service forwards log messages from Azure SDK event sources to <xref:Microsoft.Extensions.Logging.ILoggerFactory> to enables you to use the standard ASP.NET Core logging configuration for logging.
127+
The Azure SDK for .NET client libraries can log client library operations to monitor requests and responses to Azure services. Client libraries can also log a variety of other events, including retries, token retrieval, and service-specific events from various clients. When you register an Azure SDK client using the <xref:Microsoft.Extensions.Azure.AzureClientServiceCollectionExtensions.AddAzureClients%2A> extension method, the <xref:Microsoft.Extensions.Azure.AzureEventSourceLogForwarder> is registered with the dependency injection container. The `AzureEventSourceLogForwarder` forwards log messages from Azure SDK event sources to <xref:Microsoft.Extensions.Logging.ILoggerFactory> to enables you to use the standard ASP.NET Core logging configuration for logging.
128128
129129
The following table depicts how the Azure SDK for .NET `EventLevel` maps to the ASP.NET Core `LogLevel`. For more information on these topics and other scenarios, visit the [Logging with the Azure SDK for .NET](/dotnet/azure/sdk/logging) and [Dependency injection with the Azure SDK for .NET](/dotnet/azure/sdk/dependency-injection) pages.
130130

docs/azure/sdk/snippets/aspnetcore-guidance/BlazorSample/BlazorSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.2" />
1111
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
1212
<PackageReference Include="Azure.Storage.Blobs" Version="12.22.2" />
13-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.6" />
13+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.8.0" />
1414
</ItemGroup>
1515

1616
</Project>

docs/azure/sdk/snippets/aspnetcore-guidance/MinApiSample/MinApiSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<PackageReference Include="Azure.Messaging.ServiceBus" Version="7.18.2" />
1313
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
1414
<PackageReference Include="Azure.Storage.Blobs" Version="12.22.2" />
15-
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.7.6" />
15+
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.8.0" />
1616
</ItemGroup>
1717

1818
</Project>

0 commit comments

Comments
 (0)