locked
Getting system exception as 'System.Net.WebException' in System.dll RRS feed

  • Question

  • Hi,

    I am using dotnet version 4.6.1. My code is accepting data from Azure Event Hub. The code was working fine and it was receiving data from event hub but now I am getting multiple exceptions related to dll. I didn't make any changes in code. Yes, there is probability of setting changes in browsers. I am getting following exceptions. Please suggsest me the solution.

    Thanks in advance!

    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in System.dll
    Exception thrown: 'System.Net.WebException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in Microsoft.WindowsAzure.Storage.dll
    Exception thrown: 'Microsoft.WindowsAzure.Storage.StorageException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x3898 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0xe54 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x3fcc has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x2648 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x2e94 has exited with code 0 (0x0).
    The thread 0x4564 has exited with code 0 (0x0).
    Exception thrown: 'System.Net.Sockets.SocketException' in System.dll
    Exception thrown: 'System.IO.IOException' in System.dll
    Exception thrown: 'System.IO.IOException' in System.dll
    Exception thrown: 'System.IO.IOException' in System.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x3f20 has exited with code 0 (0x0).
    Exception thrown: 'Microsoft.ServiceBus.Messaging.Amqp.AmqpException' in Microsoft.ServiceBus.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x10d8 has exited with code 0 (0x0).
    The thread 0x4738 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0xf10 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x4584 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    The thread 0x3d58 has exited with code 0 (0x0).
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll
    Exception thrown: 'System.ArgumentException' in mscorlib.dll

    Saturday, November 7, 2020 9:47 PM

All replies

  • I don't write Azure applications, but from the fact that you have so many ArgumentExceptions, I think one or more of your libraries are not targeting .NET Framework 4.6.1, so either the type or number of parameters provided does not match what the method(s) expected.
    Monday, November 9, 2020 1:24 AM
    Answerer
  • The code was working fine till now and suddenly started to give these DLL exceptions.

    So this issue is not about any method or parameters. I run the Visual Studio in admin mode only.

    Still getting same exceptions. Can anybody suggest if there is need of changing INTERNET SETTINGS?

    I am not sure which type of issue is this.

    Monday, November 9, 2020 7:23 AM
  • If you can run debug on it, you can go to "Debug"->"Windows"->"Exception Settings" and select "Common Language Runtime Exceptions->"System.ArgumentException" (or other relevent ones) then debug it, and give us sample stacktrace on what caused the exceptions.

    However, given you application is related to "Azure Event Hubs", if you found the exception appear in "Azure Event Hubs"-specific routines, you'll want to post to Microsoft Q&A directly.

    Monday, November 9, 2020 8:45 AM
    Answerer
  • This what I am getting in call stack 

                                                                              

    > mscorlib.dll!System.ThrowHelper.ThrowArgumentException(System.ExceptionResource resource) Line 72 C#
    mscorlib.dll!System.Collections.Generic.Dictionary<string, Microsoft.ServiceBus.Messaging.BlobLease>.Insert(string key, Microsoft.ServiceBus.Messaging.BlobLease value, bool add) Line 336 C#
    mscorlib.dll!System.Collections.Generic.Dictionary<System.__Canon, System.__Canon>.Add(System.__Canon key, System.__Canon value) Line 193 C#
    Microsoft.ServiceBus.Messaging.EventProcessorHost.dll!Microsoft.ServiceBus.Messaging.PartitionManager<Microsoft.ServiceBus.Messaging.BlobLease>.TakeLeasesAsync() Unknown
    [Resuming Async Method]
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine) Line 1090 C#
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Line 1070 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Line 977 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke() Line 1123 C#
    mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Line 288 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke() Line 1123 C#
    mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Line 810 C#
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations() Line 3617 C#
    mscorlib.dll!System.Threading.Tasks.Task.FinishStageThree() Line 2363 C#
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result) Line 490 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncTaskMethodBuilder<Microsoft.ServiceBus.Messaging.BlobLease>.SetResult(Microsoft.ServiceBus.Messaging.BlobLease result) Line 608 C#
    [Completed] Microsoft.ServiceBus.Messaging.EventProcessorHost.dll!Microsoft.ServiceBus.Messaging.BlobLeaseManager.DownloadLeaseBlob(Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob blob) Unknown
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine) Line 1090 C#
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run() Line 1070 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0() Line 977 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke() Line 1123 C#
    mscorlib.dll!System.Runtime.CompilerServices.TaskAwaiter.OutputWaitEtwEvents.AnonymousMethod__0() Line 288 C#
    mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke() Line 1123 C#
    mscorlib.dll!System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(System.Action action, bool allowInlining, ref System.Threading.Tasks.Task currentTask) Line 810 C#
    mscorlib.dll!System.Threading.Tasks.Task.FinishContinuations() Line 3617 C#
    mscorlib.dll!System.Threading.Tasks.Task.FinishStageThree() Line 2363 C#
    mscorlib.dll!System.Threading.Tasks.Task<System.__Canon>.TrySetResult(System.__Canon result) Line 490 C#
    mscorlib.dll!System.Threading.Tasks.TaskCompletionSource<System.__Canon>.TrySetResult(System.__Canon result) Line 298 C#
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncExtensions.CreateCallbackVoid.AnonymousMethod__3(System.IAsyncResult ar) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.StorageCommandAsyncResult.OnComplete() Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndOperation<Microsoft.WindowsAzure.Storage.Core.NullType>(Microsoft.WindowsAzure.Storage.Core.Executor.ExecutionState<Microsoft.WindowsAzure.Storage.Core.NullType> executionState) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndResponseStreamCopy<Microsoft.WindowsAzure.Storage.Core.NullType>(Microsoft.WindowsAzure.Storage.Core.Executor.ExecutionState<Microsoft.WindowsAzure.Storage.Core.NullType> executionState) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier<Microsoft.WindowsAzure.Storage.Core.NullType>.ProcessCompletion() Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier<System.__Canon>.SignalCompletion() Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier<System.__Canon>.EndOperation(System.IAsyncResult res) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier<Microsoft.WindowsAzure.Storage.Core.NullType>.EndOpWithCatch(System.IAsyncResult res) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.AsyncStreamCopier<Microsoft.WindowsAzure.Storage.Core.NullType>.StartCopyStream(System.Action<Microsoft.WindowsAzure.Storage.Core.Executor.ExecutionState<Microsoft.WindowsAzure.Storage.Core.NullType>> completedDelegate, long? copyLength, long? maxLength) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Util.StreamExtensions.WriteToAsync<Microsoft.WindowsAzure.Storage.Core.NullType>(System.IO.Stream stream, System.IO.Stream toStream, long? copyLength, long? maxLength, bool calculateMd5, Microsoft.WindowsAzure.Storage.Core.Executor.ExecutionState<Microsoft.WindowsAzure.Storage.Core.NullType> executionState, Microsoft.WindowsAzure.Storage.Core.Util.StreamDescriptor streamCopyState, System.Action<Microsoft.WindowsAzure.Storage.Core.Executor.ExecutionState<Microsoft.WindowsAzure.Storage.Core.NullType>> completed) Unknown
    Microsoft.WindowsAzure.Storage.dll!Microsoft.WindowsAzure.Storage.Core.Executor.Executor.EndGetResponse<Microsoft.WindowsAzure.Storage.Core.NullType>(System.IAsyncResult getResponseResult) Unknown
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415 C#
    System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Line 469 C#
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917 C#
    System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 463 C#
    System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 368 C#
    System.dll!System.Net.HttpWebRequest.ProcessResponse() Line 3808 C#
    System.dll!System.Net.HttpWebRequest.SetResponse(System.Net.CoreResponseData coreResponseData) Line 3745 C#
    System.dll!System.Net.HttpWebRequest.SetAndOrProcessResponse(object responseOrException) Line 3709 C#
    System.dll!System.Net.ConnectionReturnResult.SetResponses(System.Net.ConnectionReturnResult returnResult) Line 205 C#
    System.dll!System.Net.Connection.ReadComplete(int bytesRead, System.Net.WebExceptionStatus errorStatus) Line 3633 C#
    System.dll!System.Net.Connection.ReadCallback(System.IAsyncResult asyncResult) Line 3268 C#
    System.dll!System.Net.Connection.ReadCallbackWrapper(System.IAsyncResult asyncResult) Line 3207 C#
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415 C#
    System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 368 C#
    System.dll!System.Net.Security._SslStream.ProcessFrameBody(int readBytes, byte[] buffer, int offset, int count, System.Net.AsyncProtocolRequest asyncRequest) Line 864 C#
    System.dll!System.Net.Security._SslStream.ReadFrameCallback(System.Net.AsyncProtocolRequest asyncRequest) Line 1031 C#
    System.dll!System.Net.AsyncProtocolRequest.CompleteRequest(int result) Line 142 C#
    System.dll!System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(int bytes) Line 125 C#
    System.dll!System.Net.FixedSizeReader.ReadCallback(System.IAsyncResult transportResult) Line 148 C#
    System.dll!System.Net.LazyAsyncResult.Complete(System.IntPtr userToken) Line 415 C#
    System.dll!System.Net.ContextAwareResult.CompleteCallback(object state) Line 469 C#
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 980 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 928 C#
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 917 C#
    System.dll!System.Net.ContextAwareResult.Complete(System.IntPtr userToken) Line 463 C#
    System.dll!System.Net.LazyAsyncResult.ProtectedInvokeCallback(object result, System.IntPtr userToken) Line 368 C#
    System.dll!System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* nativeOverlapped) Line 399 C#
    mscorlib.dll!System.Threading._IOCompletionCallback.PerformIOCompletionCallback(uint errorCode, uint numBytes, System.Threading.NativeOverlapped* pOVERLAP) Line 135 C#
    [Async Call Stack]
    [Async] Microsoft.ServiceBus.Messaging.EventProcessorHost.dll!Microsoft.ServiceBus.Messaging.PartitionManager<Microsoft.ServiceBus.Messaging.BlobLease>.LeaseTakerAsync() Unknown

    Monday, November 9, 2020 9:52 AM
  • From your stack trace, ArgumentException is thrown because there is duplicate key for your Dictionary entries.

    Better check your data source again and see if they introduced change(s) recently.

    If you found nothing relevant in the classes involved in your PartitionManager<BlobLease>LeaseTakeAsync() call, please forward the findings to Microsoft Q&A forum and see if others have idea on what could cause this.
    Monday, November 9, 2020 10:01 AM
    Answerer
  • Now I am attaching screenshot of my exception.

    I also got exception as  'SYMBOL NOT LOADED' 

    mscorlib.pdb not loaded.

    mscorlib.pdb contains the debug information required to find the source for the module mscorlib.dll
    Monday, November 9, 2020 3:53 PM
  • > I also got exception as  'SYMBOL NOT LOADED' 

    > mscorlib.pdb not loaded.

    That's a normal one if you don't have symbol server configured for Visual Studio to find the debug symbol.

    Unless you're trying to debug code in .NET framework runtime itself, this seldom matters.

    To setup Visual Studio to use Symbol Server:

    https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-debug-dotnet-framework-source?view=vs-2019

    And here's page for URL of Microsoft's public symbol server:

    https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/microsoft-public-symbols

    Tuesday, November 10, 2020 1:13 AM
    Answerer