Code Monkey home page Code Monkey logo

aspire-samples's Introduction

.NET Aspire Samples

CI (main)

Samples for .NET Aspire.

.NET Aspire is a stack for building resilient, observable, cloud-native apps with .NET.

Official Samples

Official samples hosted in this repo can be accessed via the Samples browser.

Sample highlights include:

eShop

eShop is a reference .NET application implementing an eCommerce web site using a services-based architecture using .NET Aspire.

.NET Aspire Links

License

.NET (including the aspire-samples repo) is licensed under the MIT license.

Disclaimer

The sample applications provided in this repository are intended to illustrate individual concepts that may be beneficial in understanding the underlying technology and its potential uses. These samples may not illustrate best practices for production environments.

The code is not intended for operational deployment. Users should exercise caution and not rely on the samples as a foundation for any commercial or production use. See ASP.NET Core security topics for more information on security concerns related to hosting ASP.NET Core applications.

Contributing

We welcome contributions to this repository of samples related to official .NET Aspire hosting and components pieces (i.e. those pieces who's code lives in the Aspire repo and that ship from the Aspire NuGet account). It's generally a good idea to log an issue first to discuss any idea for a sample with the team before sending a pull request.

Code of conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.

aspire-samples's People

Contributors

alexwolfmsft avatar antonfirsov avatar balachir avatar camsoper avatar damianedwards avatar danmoseley avatar davidfowl avatar depechie avatar dependabot[bot] avatar hishamco avatar ievangelist avatar jamesnk avatar layla-p avatar microsoft-github-operations[bot] avatar microsoftopensource avatar moljac avatar reubenbond avatar rick-anderson avatar sebastienros avatar secpriano avatar sgbj avatar timdeschryver avatar vishipayyallore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspire-samples's Issues

Add samples showing how to use the support in Aspire.Hosting for database containers

Show how to use Aspire.Hosting support for well-known database containers like PostgreSQL and SQL Server (without Entity Framework Core) including how to initialize them using the features of the underlying container, e.g. to create the database (especially when not using EF Core) to ensure that the connection string provided for the AddDatabase call can actually be connected to.

Inconsistent Database Behavior - 'DB does not exist' Error vs. Data Visibility in eShopLite UI

I'm encountering an unusual issue with the catalog database in our project. It manifests in several conflicting ways:

  1. Database Existence Error: The primary concern is an error message stating "database does not exist." This error appears in the logs, but the exact circumstances leading to this error are unclear. A screenshot of the error can be found here: Database Error Screenshot.

  2. Database Visibility in pgAdmin: Contradicting the error, when I inspect the database through pgAdmin, the database seems intact. This might indicate a permissions issue with PostgreSQL, but I'm not certain. Here's a screenshot of the pgAdmin view: pgAdmin View Screenshot.

  3. Data Seeding and UI Interaction: Further adding to the confusion, when I access the UI immediately after data seeding, the catalog data is present and correctly displayed in the eShopLite UI. This suggests that the database is not only created but also accessible by the catalog service.

Conclusion and Request for Assistance:
The logs in the Aspire dashboard are indicating a missing database, which is in direct conflict with both the pgAdmin view and the UI behavior. This inconsistency is perplexing, and I am seeking insights or suggestions on how to resolve or further diagnose this issue.

Example: Azure Functions ๐ŸŒฉ๏ธ

I'd like to propose the inclusion of Azure Functions projects as examples within the Aspire framework. This addition would be particularly beneficial for developers and aligns well with the cloud-native direction of Aspire.

Given that both the SDK and runtime for Azure Functions are open-source, integrating them as first-class citizens in the Aspire ecosystem seems a natural fit. Such integration would not only enhance the current offerings of Aspire but also provide practical, cloud-native examples that developers can leverage in their projects.

https://azure.microsoft.com/en-us/updates/ga-azure-functions-supports-net-8-in-the-isolated-worker-model/

Add samples for different patterns of composing services from multiple repositories into an AppHost project

From dotnet/aspire#829

We should investigate how we can add some samples of various patterns that could be used to orchestrate projects and services from multiple repos rather than mono-repo. It's common to split up service ownership by team or simply to put them in their own repos.

Some patterns I imagine might emerge:

  • git sub-modules for service repos and a parent repo with the .sln file and AppHost project, if you want to build and run all services locally
  • Services published as container images that are then composed into an AppHost project as containers, if you don't want to build the services locally but you do want to run them locally
  • Dev-instances of services deployed to dedicated environments and/or locally that are then composed into an AppHost project as dotnet/aspire#775, if you don't want to build or run the services locally

Show composing a Python app into AppHost as a resource

Scenario:

  • ASP.NET Core API frontend (e.g. Blazor SSR)
  • Python (e.g. FastAPI) backend
  • Frontend talks to the backend
  • Backend talks to a PostgreSQL database
  • Both apps should be composed into AppHost project so that service endpoint from backend is injected into environment of frontend
  • Backend should have connection string of database injected into environment variables

Add sample to use Aspire with CosmosDB

I would appreciate if there was a sample showing how to use CosmosDB in Aspire since this simple setup isn't working and I have no clue on what's missing.

var builder = DistributedApplication.CreateBuilder(args);

var db = builder.AddAzureCosmosDB("db");

var api = builder.AddProject<Projects.API>("api")
    .WithReference(db);

builder.Build().Run();

See: dotnet/aspire#1502

Add CI build

Repo should have a CI build to validate that samples compile successfully.

Add Dapr examples Used in the Main Aspire repo

I was looking at the aspire dapr sample in the main Aspire repo and noticed that the sample in the main repo seems to have a little bit more functionality than the one here in the samples directory. Wanting to see if the samples could add the extra functionality from the main repo and if some additional functionality could possibly be added to expand upon the one in the main repo.

Here is what I am referring to

image

This is the app host file in this repo

image

eshoplite project dotnet publish error:

C:\Program Files\dotnet\sdk\8.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets(112,5): error NETSDK1152: Found multiple publish output files with the same relative path: D:\cupertino\aspire-samples\samples\eShopLite\eShopLite.CatalogDb\appsettings.De
velopment.json, D:\cupertino\aspire-samples\samples\eShopLite\eShopLite.CatalogService\appsettings.Development.json, D:\cupertino\aspire-samples\samples\eShopLite\eShopLite.CatalogDb\appsettings.json, D:\cupertino\aspire-samples\samples\eShopLite\eShopLite.CatalogService\appsett
ings.json. [D:\cupertino\aspire-samples\samples\eShopLite\eShopLite.CatalogService\eShopLite.CatalogService.csproj]

It seems that both db and service project have appetting file. and output to the same folder/

[WebToolsE2E][Aspire] Build AspireWithNode solution failed with "The call is ambiguous between the following methods or properties: ..." after updating to Aspire 8.0 preview 2

REGRESSION INFO: Worked fine with Aspire 8.0.0-preview.1.23557.2

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 Preview 2
  3. Install Aspire Preview 2 latest build 8.0.0-preview.2.23610.1
  4. Apply NuGet Feeds
  5. Install node from nodejs.org

REPRO STEPS

  1. Clone aspire-samples repo
  2. Checkout preview.2 branch
  3. Update NuGet.config to use the dotnet-tools feed
  4. Update Directory.Packages.props to use aspire version 8.0.0-preview.2.23610.1
  5. Open solution AspireWithNode.sln
  6. Build solution

ACTUAL
Failed to build solution with error: The call is ambiguous between the following methods or properties: 'Aspire.Hosting.NodeAppHostingExtension.AddNodeApp(Aspire.Hosting.IDistributedApplicationBuilder, string, string, string, string[]?)' and 'Aspire.Hosting.NodeAppHostingExtension.AddNodeApp(Aspire.Hosting.IDistributedApplicationBuilder, string, string, string?, string[]?)' AspireWithNode.AppHost

image

EXPECTED
Build solution successfully.

Dapr Actor Example?

I can't get a simple actor setup working but looking through some of the Dapr configuration DaprClient is not setup the same way as the ActorProxy class. Wondering if it should be working and I'm just not sure how to set it up correctly with an asp.net core web project hosting the actor proxy implementation and getting a simple console app to use the Proxy and make calls to the actors. The connection doesnt seem to work for me, but there's no starter sample using actors so I'm not sure if its me or if it's been an oversight with Actors being different to Sidecar web services or something?

Unable to view weather page in webfrontend endpoint when running AspireWithDapr solution with error 'CreateFile .dapr\components: The system cannot find the path specified

REGRESSION INFO: Worked fine with Aspire 8.0.0-preview.1.23557.2

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 Preview 2
  3. Install Aspire Preview 2 latest build 8.0.0-preview.2.23610.1
  4. Apply NuGet Feeds

REPRO STEPS

  1. Clone aspire-samples repo
  2. Checkout preview.2 branch
  3. Update NuGet.config to use the dotnet-tools feed
  4. Update Directory.Packages.props to use aspire version 8.0.0-preview.2.23610.1
  5. Open solution AspireWithDapr.sln
  6. Build and Ctrl+F5

ACTUAL
Initially, I ran the solution without installing dapr CLI. I get errors as shown below.

image

image

After I install dapr CLI from here, I now see the following error

image

EXPECTED
Able to successfully run the AspireWithDapr solution

Using a SQL Container with a Volume

We need an example about how to configure SQL Server container with a Volume using Aspire. I have tried using the method WithVolumeMount, but with no luck.

[WebToolsE2E][Aspire] Failed to start container with running the Metrics solution: "Ports are not available: exposing port TCP 127.0.0.1:9090"

REGRESSION INFO: Worked fine with Aspire 8.0.0-preview.1.23557.2

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 Preview 2
  3. Install Aspire Preview 2 latest build 8.0.0-preview.2.23617.2
  4. Apply NuGet Feeds
  5. Install Docker Desktop

REPRO STEPS

  1. Clone aspire-samples repo
  2. Checkout preview.2 branch
  3. Open solution Metrics.sln
  4. Build and Ctrl+F5

ACTUAL
fail: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0]
could not start the container {"Controller": "usvc-dev.developer.microsoft.com/container-reconciler", "ContainerName": {"name":"prometheus"}, "Reconciliation": 5, "error": "RunContainer command returned error code 125 Stdout: '81cb928dcab9786e061fd2d083a1a2d7ea5d9f76fb6aa160fe184028d8536b9b\n' Stderr: 'docker: Error response from daemon: Ports are not available: exposing port TCP 127.0.0.1:9090 -> 0.0.0.0:0: listen tcp 127.0.0.1:9090: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.\n'"}
image
image

EXPECTED

image

.net aspire azd deploy timing out

I am trying to deploy the sample project for aspire. I am basically creating a simple aspire project using visual studios template and following the documentation step to deploy the project.
everything seems to work fine, until I reach the point where I do azd up. It created all the needed resources fine, but when it starts doing azd deploy it takes some time on pushing to container image and then gives an error saying ** failing invoking action 'deploy', publishing container: dotnet publish on project** and ** Failed to push to the output registry: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing**.

I check if I have permissions to push to acr in azure and I am the owner for the subscription.
I really don't know what's the issue here.

Deploying AspireWithNode to Azure using azd doesn't deploy the node frontend

I tried to deploy the AspireWithNode sample to azure using azd, as the ease of deployment was a highlighted feature of Aspire. From what I can tell it deployed the container with the redis cache and the webapi with the weatherforecast service, but not the frontend node app that connects to those two.

I was particularly interested in seeing how that project would deploy, since being able to deploy a node project makes sense for at lot of SPA applications that might be able to leverage frontend framework features like SSR if they ran from node directly, rather than deploying the static build files to azure static apps, or through a regular app service.

Steps:

  1. Clone this repo
  2. cd into \samples\AspireWithNode\AspireWithNode.AppHost
  3. azd init
  4. azd up

Additional note: the webapi project was deployed in a container. It would be nice to be able to deploy that as an app service instead.

[eShopLite] Exception when navigating to cart

I'm not sure how functional the sample is supposed to be but...

  1. Run the eShopLite apphost
  2. Navigate to frontend
  3. add some things to cart
  4. Click cart
    OBSERVE: Cart goes from a count to 0
  5. Click cart again
    OBSERVE: exception
Grpc.Core.RpcException: Status(StatusCode="NotFound", Detail="Basket with buyer id user does not exist")
   at eShopLite.Frontend.Services.BasketServiceClient.CheckoutBasketAsync(String buyerId) in D:\GitHub\aspire-samples\samples\eShopLite\eShopLite.Frontend\Services\BasketServiceClient.cs:line 60
   at eShopLite.Frontend.Components.Cart.HandleCheckout() in D:\GitHub\aspire-samples\samples\eShopLite\eShopLite.Frontend\Components\Cart.razor:line 42
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.Forms.EditForm.HandleSubmitAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)

How do you load/define dapr components?

I'm not seeing it in the dapr sample, it seems to just start a sidecar that does nothing?

The sample could, for example, demonstrate using a cron binding

Edit:

This is how

    .WithDaprSidecar(new DaprSidecarOptions
    {
        AppId = "your-api",
        ResourcesPaths = [
            "../your/components",
        ],
    });

AspireWithDapr project Errors

AspireWithDapr sample dose not work properly and gets this error in apiservice-dapr and webfrontend-dapr resources :

Error: could not create Endpoint object {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}

invalid argument "{{- portForServing "apiservice-dapr_grpc" -}}" for "-G, --dapr-grpc-port" flag: strconv.ParseInt: parsing "{{- portForServing "apiservice-dapr_grpc" -}}": invalid syntax
Error: invalid argument "{{- portForServing "apiservice-dapr_grpc" -}}" for "-G, --dapr-grpc-port" flag: strconv.ParseInt: parsing "{{- portForServing "apiservice-dapr_grpc" -}}": invalid syntax

invalid argument "{{- portForServing "webfrontend-dapr_grpc" -}}" for "-G, --dapr-grpc-port" flag: strconv.ParseInt: parsing "{{- portForServing "webfrontend-dapr_grpc" -}}": invalid syntax
Error: invalid argument "{{- portForServing "webfrontend-dapr_grpc" -}}" for "-G, --dapr-grpc-port" flag: strconv.ParseInt: parsing "{{- portForServing "webfrontend-dapr_grpc" -}}": invalid syntax

Note : Dapr projects work properly standalone in my machine also other Aspire projects.

image

image

image

[WebToolsE2E] Unable to load frontend endpoint when running AspireWithNode solution with error 'service-producer annotation is invalid'

REGRESSION INFO: Worked fine with Aspire 8.0.0-preview.1.23557.2

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.9 Preview 2
  3. Install Aspire Preview 2 latest build 8.0.0-preview.2.23607.7
  4. Apply NuGet Feeds
  5. Install node from nodejs.org

REPRO STEPS

  1. Clone aspire-samples repo
  2. Checkout preview.2 branch
  3. Update NuGet.config to use the dotnet-tools feed
  4. Update Directory.Packages.props to use aspire version 8.0.0-preview.2.23607.7
  5. Open solution AspireWithNode.sln
  6. Build and Ctrl+F5

ACTUAL
frontend endpoint does not load

fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
could not create Endpoint object {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "ServiceName": "frontend", "Workload": "/frontend", "error": "service-producer annotation is invalid: missing information about the port to expose the service"}

image

image

EXPECTED
Ctrl+F5 to work successfully

Error Running AspireWithDapr Sample

Environment

Mac with Apple Silicon

Dapr Setup

  1. Run Docker Desktop
  2. Install Dapr CLI
  3. Initialize Dapr: dapr init

Steps

  1. Run AspireWithDapr.AppHost

Result

info: Aspire.Dashboard.DashboardWebApplication[0]
      Now listening on: http://localhost:15278
info: Aspire.Dashboard.DashboardWebApplication[0]
      OTLP server running at: http://localhost:16064
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start a process {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "Executable": {"name":"api"}, "Reconciliation": 8, "State": "", "ExecutionID": "", "error": "fork/exec /usr/local/bin/dapr: no such file or directory"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "Executable": {"name":"api"}, "Reconciliation": 8, "State": "", "ExecutionID": "", "error": "fork/exec /usr/local/bin/dapr: no such file or directory"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start a process {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "Executable": {"name":"web"}, "Reconciliation": 9, "State": "", "ExecutionID": "", "error": "fork/exec /usr/local/bin/dapr: no such file or directory"}
fail: Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler[0]
      failed to start Executable        {"Controller": "usvc-dev.developer.microsoft.com/executable-reconciler", "Executable": {"name":"web"}, "Reconciliation": 9, "State": "", "ExecutionID": "", "error": "fork/exec /usr/local/bin/dapr: no such file or directory"}
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Development
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /Users/anthonysneed/Source/poc/aspire-samples/samples/AspireWithDapr/AspireWithDapr.AppHost

How to Aspire with 100s of services, Executables?

When creating an Aspire app host, I following this logic ...
builder.AddProject<Projects.NextWare_UI_Builder_EditServices_API>("nextwareuibuildereditservices");

For this I need to add a project reference to the NextWare_UI_Builder_EditServices_API project in the Aspire AppHost.

Does that mean that our Aspire AppHost project would need to have a project dependency on each of the 100+ service projects or is there another way to configure this?

And, what is meant by executables in the Dashboard?

Example: Yarp Api Gateway & Ingress ๐Ÿ›œ

Noticed there were new yarp packages that dont seem to be mentioned anywhere the yarp or aspire docs, so I made a simple poc repo of yarp working with aspire (that can be used as a reference for now) here. I used the main aspire repo's sample project as a reference. This won't be exactly what it looks like in the pr for this issue, but it is a simple starting point and something similar to what I am wanting to be displayed for devs wanting to use yarp with aspire.

Example: Blazor Custom Elements and Storybook UI via Aspire

I noticed that Blazor allows you to create custom elements

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/js-spa-frameworks?view=aspnetcore-8.0#blazor-custom-elements

And, then I noticed that storybook supports web components

image

ย 
So, I am thinking about attempting to try and see if I can use a blazor web app or component library to build custom elements and try and get storybook to show it in its ui. Wanting to find and acknowledge any roadblocks or pain points with this approach and see if I can get at least something working with this.

So basically, we have a

graph LR
    aspireAppHost[Aspire App Host]
    storybookNpmApp[Storybook NPM App]
    blazorWebApp[Blazor Web App]
    blazorComponentLibrary[Blazor Component Library]

    aspireAppHost --> blazorWebApp
    aspireAppHost --> storybookNpmApp
    storybookNpmApp --> blazorWebApp
    blazorWebApp --> blazorComponentLibrary

--bind postgres is not working.

MANAULLY CREATE THE POSTGRES DATABASE BINDING

az containerapp update --name "catalogservice" --resource-group $RESOURCE_GROUP --bind postgres

Execluded the --bind then the command started working

az containerapp create --name bindingdebug --image mcr.microsoft.com/k8se/services/postgres:14 --environment $ENVIRONMENT --resource-group $RESOURCE_GROUP
--min-replicas 1 --max-replicas 1 --command "/bin/sleep" "infinity"

image

Sample using qdrant and semantic kernel

This would enable us to show OpenAI, along with the ability for an Aspire app to pull in a containerized feature set like qdrant. I have this working in a larger-than-a-sample-sized app we could scale back for customers to see opportunities for Aspire and OpenAI.

Initial Aspire Dapr Samples Communication Errors

When navigating to "Weather" on the client site, the weather forecast API is unable to be reached.

I've reproduced this on 2 Windows machines and on OS X with various configurations to ensure it wasn't a local network configuration issue.


Thanks for all the great work! Excited to play with this!

Dapr.Client.InvocationException: An exception occurred while invoking method: 'weatherforecast' on app-id: 'api'
---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer.
---> System.Net.Sockets.SocketException (54): Connection reset by peer
--- End of inner exception stack trace ---

Full Stack Trace:

Dapr.Client.InvocationException: An exception occurred while invoking method: 'weatherforecast' on app-id: 'api'
 ---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.IO.IOException: Unable to read data from the transport connection: An established connection was aborted by the software in your host machine..
 ---> System.Net.Sockets.SocketException (10053): An established connection was aborted by the software in your host machine.
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.CreateException(SocketError error, Boolean forAsyncThrow)
   at System.Net.Sockets.NetworkStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetResult(TResult result)
   at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionWithTelemetryAsync(HttpRequestMessage request, HttpConnectionPool pool, Boolean async, CancellationToken requestCancellationToken)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext()
   at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
   at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
   at System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder`1.SetResult(TResult result)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.MoveNext(Thread threadPoolThread)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecuteFromThreadPool(Thread threadPoolThread)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
--- End of stack trace from previous location ---

   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.Metrics.MetricsHandler.SendAsyncWithMetrics(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at Dapr.Client.DaprClientGrpc.InvokeMethodWithResponseAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](HttpRequestMessage request, CancellationToken cancellationToken)
   at AspireWithDapr.Web.WeatherApiClient.GetWeatherAsync() in C:\Users\RapidWeb\Code\DotNet8\AspireWithDapr\AspireWithDapr.Web\WeatherApiClient.cs:line 9
   at AspireWithDapr.Web.Components.Pages.Weather.OnInitializedAsync() in C:\Users\RapidWeb\Code\DotNet8\AspireWithDapr\AspireWithDapr.Web\Components\Pages\Weather.razor:line 47
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
   at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
   at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
   at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
   at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.OutputCaching.OutputCacheMiddleware.<>c__DisplayClass11_0.<<InvokeAwaited>g__ExecuteResponseAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.OutputCaching.WorkDispatcher`2.ScheduleAsync(TKey key, Func`2 valueFactory)
   at Microsoft.AspNetCore.OutputCaching.OutputCacheMiddleware.InvokeAwaited(HttpContext httpContext, IReadOnlyList`1 policies)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
   at Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Watch.BrowserRefresh.BrowserRefreshMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.