Not allowed to change the 'AccessToken' property. The connection's current state is open #2662
Unanswered
v-npapisetty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've upgraded the SqlClient from 'System.Data.SqlClient' to 'Microsoft.Data.SqlClient' and I keep getting this exception while running a stored procedure.
Stack Trace:
System.AggregateException:
at System.Threading.Tasks.Task.ThrowIfExceptional (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Threading.Tasks.Task.Wait (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Threading.Tasks.Task.Wait (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities.GeneralHelper.CallSynchronously (Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\Utilities\GeneralHelper.cs:157)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions.RunQuery (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:258)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions.SqlQuerySmart (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:162)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.OrganizationsRepository.GetById (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\Repositories\OrganizationsRepository.cs:78)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers.OrganizationDataProvider+<>c__DisplayClass19_0.b__1 (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.Providers\OrganizationDataProvider.cs:313)
at Microsoft.Dynamics.AX.LifecycleServices.Common.CacheExtensions.CreateLcsCacheItem (Microsoft.Dynamics.AX.LifecycleServices.LcsCache, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\LcsCache\CacheExtensions.cs:105)
at Microsoft.Dynamics.AX.LifecycleServices.Common.CacheExtensions.GetOrSetInCache (Microsoft.Dynamics.AX.LifecycleServices.LcsCache, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\LcsCache\CacheExtensions.cs:55)
at Microsoft.Dynamics.AX.LifecycleServices.Common.CacheExtensions.GetOrSetInCache (Microsoft.Dynamics.AX.LifecycleServices.LcsCache, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\LcsCache\CacheExtensions.cs:24)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers.OrganizationDataProvider+d__19.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.Providers\OrganizationDataProvider.cs:328)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers.ProjectDataProvider+<PopulateOrgAndUserProfileDetails>d__116.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.Providers\ProjectDataProvider.cs:2474) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers.ProjectDataProvider+d__23.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.Providers\ProjectDataProvider.cs:181)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeployment.PrepareStartBase+<GatherParameters>d__62.MoveNext (Lcs.Servicing.AutomatedPackageDeployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\Lcs.Servicing.AutomatedPackageDeployment\AutomatedPackageDeploymentProcessorBase\PrepareStartBase.cs:160) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeployment.SFPrepareStart+d__11.MoveNext (Lcs.Servicing.AutomatedPackageDeployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\Lcs.Servicing.AutomatedPackageDeployment\SFAutomatedPackageDeploymentProcessor\SFPrepareStart.cs:153)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeployment.PrepareStartBase+<RunHelper>d__67.MoveNext (Lcs.Servicing.AutomatedPackageDeployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\Lcs.Servicing.AutomatedPackageDeployment\AutomatedPackageDeploymentProcessorBase\PrepareStartBase.cs:196) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeployment.PrepareStartBase+<>c__DisplayClass66_0+<<Run>b__0>d.MoveNext (Lcs.Servicing.AutomatedPackageDeployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\Lcs.Servicing.AutomatedPackageDeployment\AutomatedPackageDeploymentProcessorBase\PrepareStartBase.cs:186) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.LcmDbUnitOfWork+d__587
1.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\LcmDbUnitOfWork.cs:2097) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeployment.PrepareStartBase+d__66.MoveNext (Lcs.Servicing.AutomatedPackageDeployment, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\Lcs.Servicing.AutomatedPackageDeployment\AutomatedPackageDeploymentProcessorBase\PrepareStartBase.cs:184)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeploymentLib.AutomatedPackageDeploymentTaskBase+d__60.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\LcsWorkerLib\OperationTaskLogProcessor\AutomatedPackageDeployment\AutomatedPackageDeploymentTaskBase.cs:187)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.AutomatedPackageDeploymentLib.StartEnvironmentPreparation+d__0.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\LcsWorkerLib\OperationTaskLogProcessor\AutomatedPackageDeployment\AutomationHandler\StartEnvironmentPreparation.cs:15)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.OperationTaskLogLib.OperationTaskLogProcessorTask+d__23.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\LcsWorkerLib\OperationTaskLogProcessor\OperationTaskLogProcessorTask.cs:221)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib.OperationTaskLogLib.OperationTaskLogProcessorTask+d__23.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.LcsWorkerLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\Code\LcsWorkerLib\OperationTaskLogProcessor\OperationTaskLogProcessorTask.cs:231)
Inner exception System.InvalidOperationException handled at System.Threading.Tasks.Task.ThrowIfExceptional:
at Microsoft.Data.SqlClient.SqlConnection.set_AccessToken (Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5)
at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions+d__24
1.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:539) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions+<>c__DisplayClass17_0
1+<<RunQueryAsync>b__0>d.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:277) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)at Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities.GeneralHelper+d__4
1.MoveNext (Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\Utilities\GeneralHelper.cs:74) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities.GeneralHelper+<RetryAsync>d__4
1.MoveNext (Microsoft.Dynamics.AX.LifecycleServices.Common.Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LcsCommon\Libs\Utilities\GeneralHelper.cs:85)at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions+<RunQueryAsync>d__17
1.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:334)at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess.EFStoredProcExtensions+<>c__DisplayClass16_0
1+<b__0>d.MoveNext (Microsoft.Dynamics.AX.LifecycleManager.CoreDomain.DataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: D:\Code\Dynamics-LCS\src\LCM\V2\Lcm.CoreDomain.DataAccess\EFStoredProcExtensions.cs:260)Has anyone faced a similar issue?
Beta Was this translation helpful? Give feedback.
All reactions