microsoft / microsoft/aspire-samples
The Aspire Dapr Sample does not work (VS 2022 17.13.1).
Open
Nobody has claimed this yet.
area-samples
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 345
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 30
Description
Hello,
The Aspire Dapr Sample does not work (VS 2022 17.13.1).
Thanks in advance to have a look.
2025-02-21T01:12:24 fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
2025-02-21T01:12:24 An unhandled exception has occurred while executing the request.
2025-02-21T01:12:24 Dapr.Client.InvocationException: An exception occurred while invoking method: 'weatherforecast' on app-id: 'api'
2025-02-21T01:12:24 ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 500 (Internal Server Error).
2025-02-21T01:12:24 at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
2025-02-21T01:12:24 at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](HttpRequestMessage request, CancellationToken cancellationToken)
2025-02-21T01:12:24 --- End of inner exception stack trace ---
2025-02-21T01:12:24 at Dapr.Client.DaprClientGrpc.InvokeMethodAsync[TResponse](HttpRequestMessage request, CancellationToken cancellationToken)
2025-02-21T01:12:24 at AspireWithDapr.Web.WeatherApiClient.GetWeatherAsync() in E:\source\repos\GitHub\dotnet\aspire-samples\samples\AspireWithDapr\AspireWithDapr.Web\WeatherApiClient.cs:line 9
2025-02-21T01:12:24 at AspireWithDapr.Web.Components.Pages.Weather.OnInitializedAsync() in E:\source\repos\GitHub\dotnet\aspire-samples\samples\AspireWithDapr\AspireWithDapr.Web\Components\Pages\Weather.razor:line 47
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.RenderTree.Renderer.<WaitForQuiescence>g__ProcessAsynchronousWork|54_0()
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.RenderTree.Renderer.WaitForQuiescence()
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.RenderTree.Renderer.RenderRootComponentAsync(Int32 componentId, ParameterView initialParameters)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.SendStreamingUpdatesAsync(HttpContext httpContext, Task untilTaskCompleted, TextWriter writer)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore(HttpContext context)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__10_0>d.MoveNext()
2025-02-21T01:12:24 --- End of stack trace from previous location ---
2025-02-21T01:12:24 at Microsoft.AspNetCore.OutputCaching.OutputCacheMiddleware.<>c__DisplayClass11_0.<<InvokeAwaited>g__ExecuteResponseAsync|0>d.MoveNext()
2025-02-21T01:12:24 --- End of stack trace from previous location ---
2025-02-21T01:12:24 at Microsoft.AspNetCore.OutputCaching.WorkDispatcher`2.ScheduleAsync(TKey key, Func`2 valueFactory)
2025-02-21T01:12:24 at Microsoft.AspNetCore.OutputCaching.OutputCacheMiddleware.InvokeAwaited(HttpContext httpContext, IReadOnlyList`1 policies)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
2025-02-21T01:12:24 at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run the Aspire Dapr sample with Visual Studio 2022 17.13.1 and reproduce the 500 response for the weatherforecast invocation. Start with AspireWithDapr.Web/WeatherApiClient.cs and Components/Pages/Weather.razor, then trace the failing Dapr call. Done means the sample loads without the reported invocation exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100