dotnet / dotnet/aspnetcore

[FromBody]-Attribute not working for SignalR

Open
#51,014 6 comments 0 reactions 0 assignees View on GitHub
area-signalr
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

As already mentioned in this issue [ParamsFromDI](https://github.com/dotnet/aspnetcore/issues/39795), parameters now get resolved from DI by default. But unlike ASP.NET Core, the `[FromBody]`-attribute doesn't seam to override this behavior. So I'm not able to post parameters of a type that exists in the DI container - or am I mistaken?

### Expected Behavior

Support `[FromBody]` argument in Hubs.

### Steps To Reproduce

_No response_

### Exceptions (if any)

_No response_

### .NET Version

7.0.401

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.