From da35610e00ec541ed9773ca7faaad9d4a1d5791f Mon Sep 17 00:00:00 2001 From: David Pine Date: Sat, 2 Dec 2023 10:21:03 -0600 Subject: [PATCH] Remove appsettings.json connection strings as the apphost does this (#118) --- docs/storage/azure-storage.md | 8 -------- .../AspireStorage/AspireStorage.Worker/appsettings.json | 3 --- .../tutorial/AspireStorage/AspireStorage/appsettings.json | 6 +----- 3 files changed, 1 insertion(+), 16 deletions(-) diff --git a/docs/storage/azure-storage.md b/docs/storage/azure-storage.md index 67daea7fb..ead7c636f 100644 --- a/docs/storage/azure-storage.md +++ b/docs/storage/azure-storage.md @@ -142,10 +142,6 @@ When the _AspireStorage_ project starts, it will create a `fileuploads` containe :::zone-end -In the _appsettings.json_ file of the _AspireStorage_ project, add the corresponding connection information: - -:::code language="json" source="snippets/tutorial/AspireStorage/AspireStorage/appsettings.json" highlight="9-12"::: - ## Add the .NET Aspire component to the Worker Service The worker service handles pulling messages off of the Azure Storage queue for processing. Add the [.NET Aspire Azure Queue Storage component](azure-storage-queues-component.md) component package to your _AspireStorage.Worker_ app: @@ -163,10 +159,6 @@ This method handles the following tasks: - Register a with the DI container for connecting to Azure Storage Queues. - Automatically enable corresponding health checks, logging, and telemetry for the respective services. -In the _appsettings.json_ file of the _AspireStorage.Worker_ project, add the corresponding connection string information: - -:::code language="json" source="snippets/tutorial/AspireStorage/AspireStorage.Worker/appsettings.json" highlight="8-10"::: - ## Create the form The app requires a form for the user to be able to submit support ticket information and upload an attachment. The app uploads the attached file on the `Document` () property to Azure Blob Storage using the injected . The sends a message composed of the `Title` and `Description` to the Azure Storage Queue. diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Worker/appsettings.json b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Worker/appsettings.json index 8642fd80f..88a9ac01d 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Worker/appsettings.json +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage.Worker/appsettings.json @@ -4,8 +4,5 @@ "Default": "Information", "Microsoft.Hosting.Lifetime": "Information" } - }, - "ConnectionStrings": { - "QueueConnection": "https://{account_name}.queue.core.windows.net/" } } diff --git a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage/appsettings.json b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage/appsettings.json index 6d4e41ca0..23160a4d5 100644 --- a/docs/storage/snippets/tutorial/AspireStorage/AspireStorage/appsettings.json +++ b/docs/storage/snippets/tutorial/AspireStorage/AspireStorage/appsettings.json @@ -5,9 +5,5 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", - "ConnectionStrings": { - "BlobConnection": "https://{account_name}.blob.core.windows.net/", - "QueueConnection": "https://{account_name}.queue.core.windows.net/" - } + "AllowedHosts": "*" }