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
Sending a message using Microsoft Azure ServiceBus fails when running under .NET 5.0 (Preview 8) - at least on Windows 10.0.19041 and macOS.
An InvalidOperationException ("Operation is not valid due to the current state of the object.") is thrown from [Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync](https://github.com/Azure/azure-sdk-for-net/blob/6655f73bdb422c1c3b9c36973c04de0660870186/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Core/MessageSender.cs#L538), but seems to originate in Microsoft.Azure.Amqp.dll
Regression?
Yes - works fine running on .NET Core 3.1.
Other information
Repro
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="4.1.3" />
</ItemGroup>
</Project>
class Program
{
public static async Task Main(string[] args)
{
var queueClient = new QueueClient(
"Endpoint=sb://********.servicebus.windows.net/;SharedAccessKeyName=testing-send;SharedAccessKey=********",
"********");
var message = new Message(Encoding.UTF8.GetBytes("Test message."));
await queueClient.SendAsync(message);
}
}
Stack trace:
at Microsoft.Azure.ServiceBus.Core.MessageSender.<OnSendAsync>d__58.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at Microsoft.Azure.ServiceBus.RetryPolicy.<RunOperation>d__19.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Azure.ServiceBus.RetryPolicy.<RunOperation>d__19.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
at Microsoft.Azure.ServiceBus.Core.MessageSender.<SendAsync>d__45.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at ServiceBusTestNet5.Program.<Main>d__0.MoveNext() in C:\dev\frankbuckley\ServiceBusTestNet5\ServiceBusTestNet5\Program.cs:line 17
Description
Sending a message using Microsoft Azure ServiceBus fails when running under .NET 5.0 (Preview 8) - at least on Windows 10.0.19041 and macOS.
An InvalidOperationException ("Operation is not valid due to the current state of the object.") is thrown from
[Microsoft.Azure.ServiceBus.Core.MessageSender.OnSendAsync](https://github.com/Azure/azure-sdk-for-net/blob/6655f73bdb422c1c3b9c36973c04de0660870186/sdk/servicebus/Microsoft.Azure.ServiceBus/src/Core/MessageSender.cs#L538)
, but seems to originate in Microsoft.Azure.Amqp.dllRegression?
Yes - works fine running on .NET Core 3.1.
Other information
Repro
Stack trace:
dotnet --info (Windows)
dotnet --info (Mac OS)
The text was updated successfully, but these errors were encountered: