简体   繁体   中英

Azure Cloud Services (classic) Microsoft.ServiceBus exception on .NET 4.6/4.7 (not 4.5)

Recently we had to update our code base from .NET 4.5 to .NET 4.6.1 (or higher) so we updated to 4.7.1.

Our web site, and one of the services running on the Cloud Services are running successfully (after we found out how to install .NET 4.7 on the server). However, our one service that uses Microsoft.ServiceBus to connect to an NServiceBus queue will not run outside of .NET 4.5.

Downgrading back to 4.5 makes everything work again.

We are using the following packages:

<package id="AutoMapper" version="3.3.1" targetFramework="net471" />
<package id="EntityFramework" version="6.1.3" targetFramework="net471" />
<package id="log4net" version="2.0.5" targetFramework="net471" />
<package id="Microsoft.Data.Edm" version="5.6.2" targetFramework="net471" />
<package id="Microsoft.Data.OData" version="5.6.2" targetFramework="net471" />
<package id="Microsoft.Data.Services.Client" version="5.6.2" targetFramework="net471" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net471" />
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net471" />
<package id="NServiceBus" version="5.2.4" targetFramework="net471" />
<package id="NServiceBus.Azure" version="6.2.1" targetFramework="net471" />
<package id="NServiceBus.Azure.Transports.WindowsAzureServiceBus" version="6.3.3" targetFramework="net471" />
<package id="NServiceBus.Host" version="6.0.0" targetFramework="net471" />
<package id="NServiceBus.Hosting.Azure" version="6.2.4" targetFramework="net471" />
<package id="NServiceBus.Log4Net" version="1.0.0" targetFramework="net471" />
<package id="System.Spatial" version="5.6.2" targetFramework="net471" />

The exception we receive

Microsoft.WindowsAzure.ServiceRuntime Critical: 1 : Unhandled Exception:
System.Runtime.CallbackException: Async Callback threw an exception. ---> Microsoft.ServiceBus.Common.CallbackException: An AsyncCallback threw an exception. ---> System.InvalidOperationException: The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
--- End of inner exception stack trace ---
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.OnEstablishConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.OnProcessConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult.OnUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgradeAsyncResult.OnInitiateUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorAsyncResult.OnAuthenticateAsClient(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.SslState.FinishHandshake(Exception e, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
(998.d94): CLR exception - code e0434352 (first chance)
(998.d94): CLR exception - code e0434352 (first chance)
Unhandled exception occured: System.Runtime.CallbackException: Async Callback threw an exception. ---> Microsoft.ServiceBus.Common.CallbackException: An AsyncCallback threw an exception. ---> System.InvalidOperationException: The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
--- End of inner exception stack trace ---
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.OnEstablishConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.OnProcessConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult.OnUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgradeAsyncResult.OnInitiateUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorAsyncResult.OnAuthenticateAsClient(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.SslState.FinishHandshake(Exception e, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>RdRuntime</AppDomain><Exception><ExceptionType>System.Runtime.CallbackException, System.ServiceModel.Internals, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</ExceptionType><Message>Async Callback threw an exception.</Message><StackTrace>    at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.OnEstablishConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.OnProcessConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult.OnUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgradeAsyncResult.OnInitiateUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorAsyncResult.OnAuthenticateAsClient(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.SslState.FinishHandshake(Exception e, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)</StackTrace><ExceptionString>System.Runtime.CallbackException: Async Callback threw an exception. ---&amp;gt; Microsoft.ServiceBus.Common.CallbackException: An AsyncCallback threw an exception. ---&amp;gt; System.InvalidOperationException: The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
--- End of inner exception stack trace ---
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
--- End of inner exception stack trace ---
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.Runtime.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OpenAsyncResult.OnEstablishConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnectionAsyncResult.OnProcessConnection(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreambleAsyncResult.OnUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgradeAsyncResult.OnInitiateUpgrade(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorAsyncResult.OnAuthenticateAsClient(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.SslState.FinishHandshake(Exception e, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ReadFrameCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)</ExceptionString><InnerException><ExceptionType>Microsoft.ServiceBus.Common.CallbackException, Microsoft.ServiceBus, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</ExceptionType><Message>An AsyncCallback threw an exception.</Message><StackTrace>    at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)</StackTrace><ExceptionString>Microsoft.ServiceBus.Common.CallbackException: An AsyncCallback threw an exception. ---&amp;gt; System.InvalidOperationException: The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
--- End of inner exception stack trace ---
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)</ExceptionString><DataItems><Data><Key>Microsoft.ServiceBus</Key><Value>Microsoft.ServiceBus</Value></Data></DataItems><InnerException><ExceptionType>System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.</Message><StackTrace>    at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)</StackTrace><ExceptionString>System.InvalidOperationException: The IAsyncResult implementation 'Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement+ReconnectChannelFactory`1+RequestSessionChannel+RequestAsyncResult[System.ServiceModel.Channels.IRequestSessionChannel]' tried to complete a single operation multiple times. This could be caused by an incorrect application of IAsyncResult implementation or other extensibility code, such as an IAsyncResult that returns incorrect CompletedSynchronously values, or invokes the AsyncCallback multiple times.
at Microsoft.ServiceBus.Common.AsyncResult.Complete(Boolean didCompleteSynchronously, Exception e)
at Microsoft.ServiceBus.Common.AsyncResult.AsyncCompletionWrapperCallback(IAsyncResult result)
at Microsoft.ServiceBus.Common.AsyncResult.TryComplete(Boolean didCompleteSynchronously, Exception exception)

Thanks in advance

This issue has been reported before, make sure you use the latest versions that have fixed any bugs:

Upgrade all your NServiceBus package to their latest minor/patch versions?

For example, you use:

  • NServiceBus 5.2.4, upgrade this to 5.2.26
  • NServiceBus.Azure.Transports.WindowsAzureServiceBus 6.3.3, upgrade this to 6.4.2
  • etc.

Doing this via the nuget package manager is fairly easy!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM