You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a bog standard ASPIRE project and change Hostprogram.cs to be
var builder = DistributedApplication.CreateBuilder(args);
var cosmos = builder
.AddAzureCosmosDB("cosmos")
.AddDatabase("mydatabase")
.RunAsEmulator();
builder.AddAzureCosmosDB("cosmosConnectionName");
var apiService = builder
.AddProject<Projects.HelloAspire_ApiService>("apiservice")
.WithReference(cosmos);
builder.AddProject<Projects.HelloAspire_Web>("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(apiService);
builder.Build().Run();
The API Service I attempt to use it like so
var builder = WebApplication.CreateBuilder(args);
builder.AddAzureCosmosClient("cosmos");
However two issues I am facing, one of which is Cosmos is in an exited state
The logs I get are:
2024-06-28T16:05:05.0839812 This is an evaluation version. There are [107] days left in the evaluation period.
2024-06-28T16:05:07.9676410 Starting
The other issue is, its expecting a connection string
CosmosClient could not be configured. Ensure valid connection information was provided in 'ConnectionStrings:cosmosConnectionName' or either ConnectionString or AccountEndpoint must be provided in the 'Aspire:Microsoft:Azure:Cosmos' configuration section.
Do I need to specify this when using the emulator?
The text was updated successfully, but these errors were encountered:
MACHINE SPEC
Apple M1 Pro
REPRO STEPS:
Create a bog standard ASPIRE project and change Host
program.cs
to beThe API Service I attempt to use it like so
However two issues I am facing, one of which is Cosmos is in an exited state
The logs I get are:
2024-06-28T16:05:05.0839812 This is an evaluation version. There are [107] days left in the evaluation period.
2024-06-28T16:05:07.9676410 Starting
The other issue is, its expecting a connection string
Do I need to specify this when using the emulator?
The text was updated successfully, but these errors were encountered: