Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending an AMQP message from an ASP.NET 4.7.2 page request context #553

Closed
go81816 opened this issue Nov 23, 2022 · 0 comments
Closed

Sending an AMQP message from an ASP.NET 4.7.2 page request context #553

go81816 opened this issue Nov 23, 2022 · 0 comments
Labels

Comments

@go81816
Copy link

go81816 commented Nov 23, 2022

Hello,
I am trying to use AMQPNetLite.Core to send a message to a queue from two different applications. One use case is from a request to an ASP.NET Core web api application which works as expected. The other use case is from a page in an ASP.NET 4.7.2 MVC application which results in an InvalidOperationException with HRESULT 0x80131509 which indicates that an asynchronous operation can’t be started at this time. The ASP.NET Core application is calling from an asynchronous controller function while the ASP.NET MVC application only uses synchronous controller functions, but both applications use the AMQPNetLite synchronous api.

I did some digging through the AMQPNetLite code and found an async void function called TransportWrite which I am not 100% certain is being used for my use cases however it does seem to be called from non async functions and async void functions are mentioned specifically as a potential cause of the exception I’m receiving.

Do you think it makes sense to avoid using async void functions in AMQPNetLite?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants