- 
                Notifications
    You must be signed in to change notification settings 
- Fork 715
Closed
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Milestone
Description
REGRESSION INFO: New feature for Aspire 8.0 Preview 4
INSTALL STEPS
- Clean machine: Win11 x64 23h2 ENU
- Install 17.10.0 Preview 2.0 [34628.166.main] (Includes Aspire 8.0.0-preview.4.24128.4)
- Apply NuGet Feeds
REPRO STEPS
- New Project > .NET Aspire Starter Application > named it 'AspireApp1' > .NET 8.0 > Create
- Right-click AspireApp1.web project > Add > Aspire component > Aspire.Azure.Storage.Blobs > add a component and try to use it in the code
- Open appsettings.json > make changes related to Aspire component
{ 
  "Aspire": { 
    "Azure": { 
      "Storage": { 
        "Blobs": { 
          "HealthChecks": false, 
          "Tracing": true, 
          "ClientOptions": { 
            "Diagnostics": { 
              "ApplicationId": "myapp"} 
          } 
        } 
      } 
    } 
  } 
} 
- 
In the Program.cs of web project, type following codes: 
 builder.AddAzureBlobService("blobsConnectionName");
- 
Open appsettings.json of AspireApp1.AppHost project, add ConnectionStrings configuration section: 
{ 
  "ConnectionStrings": { 
    "blobsConnectionName": "https://{account_name}.blob.core.windows.net/" 
  } 
} 
- Open Program.cs of AspireApp1.AppHost project, add following codes:
var blobs = builder.AddAzureStorage("storage")
    .RunAsEmulator()
    .AddBlobs("blobs");
var myService = builder.AddProject<Projects.AspireApp1_Web>("webfrontend")
                       .WithReference(blobs);
Note: If you replace the code in step 6 with the following code, the result is as shown below
var blobs = builder.AddConnectionString("blobs");
var myService = builder.AddProject<Projects.AspireApp1_Web>("webfrontend")
                       .WithReference(blobs);
ACTUAL
There are three URLs under the Endpoints of storage.

EXPECTED
Only one url.
Metadata
Metadata
Assignees
Labels
area-app-modelIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplicationIssues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
