Dear,
We are experiencing an issue with the Iterate Webrequest function.
The easymorph project works when used on the Desktop application.
However it doesn’t work when it runs on the server. We tested using the endpoint via PostMan and via Browser on the server and it works.
We added a log on the project to get the error, here it is :
09/09/2022 09:00:20 AM 000106 ERROR Source: action "Iterate Web request", module "Send SMS", table "Make Requests to Message API"
09/09/2022 09:00:20 AM 000107 ERROR
09/09/2022 09:00:20 AM 000108 ERROR Exception:
09/09/2022 09:00:20 AM 000109 ERROR HttpRequestException
09/09/2022 09:00:20 AM 000110 ERROR An error occurred while sending the request.
09/09/2022 09:00:20 AM 000111 ERROR Call stack:
09/09/2022 09:00:20 AM 000112 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000113 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000114 ERROR at Morph.DataDrivers.RestApi.ConfigurableHttpHandler.
________________________________________
.MoveNext()
09/09/2022 09:00:20 AM 000115 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000116 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000117 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000118 ERROR at Morph.DataDrivers.WebRequests.WebRequestDriver..MoveNext()
09/09/2022 09:00:20 AM 000119 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000120 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000121 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000122 ERROR at Morph.DataDrivers.WebRequests.WebRequestDriver..MoveNext()
09/09/2022 09:00:20 AM 000123 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000124 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000125 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000126 ERROR at Morph.Engine.WebRequest.Iterate@61-6.Invoke(Unit [1])
09/09/2022 09:00:20 AM 000127 ERROR at Ply.TplPrimitives.ContinuationStateMachine`1.System-Runtime-CompilerServices-IAsyncStateMachine-MoveNext()
09/09/2022 09:00:20 AM 000128 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000129 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000130 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000131 ERROR at Morph.DataServices.DatasetModule.appendManyAsync@385-1.Invoke(Unit [1])
09/09/2022 09:00:20 AM 000132 ERROR at Ply.TplPrimitives.ContinuationStateMachine`1.System-Runtime-CompilerServices-IAsyncStateMachine-MoveNext()
09/09/2022 09:00:20 AM 000133 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000134 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000135 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000136 ERROR at Morph.Engine.WebRequest.Iterate@53-7.Invoke(Unit [1])
09/09/2022 09:00:20 AM 000137 ERROR at Ply.TplPrimitives.AwaitableContinuation`3.Invoke(Unit r)
09/09/2022 09:00:20 AM 000138 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000139 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000140 ERROR at Ply.TplPrimitives.tryFinally@257.Invoke(AwaitableContinuation`3 this)
09/09/2022 09:00:20 AM 000141 ERROR at Ply.TplPrimitives.ContinuationStateMachine`1.System-Runtime-CompilerServices-IAsyncStateMachine-MoveNext()
09/09/2022 09:00:20 AM 000142 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000143 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000144 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000145 ERROR at <StartupCode$Morph-Engine>.$Engine.clo@236-44.Invoke(Unit [1])
09/09/2022 09:00:20 AM 000146 ERROR at Ply.TplPrimitives.ContinuationStateMachine`1.System-Runtime-CompilerServices-IAsyncStateMachine-MoveNext()
09/09/2022 09:00:20 AM 000147 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000148 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000149 ERROR at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
09/09/2022 09:00:20 AM 000150 ERROR at <StartupCode$Morph-Engine>.$Engine.clo@494-52.Invoke(Unit [1])
09/09/2022 09:00:20 AM 000151 ERROR at Ply.TplPrimitives.AwaitableContinuation`3.Invoke(Unit r)
09/09/2022 09:00:20 AM 000152 ERROR --- End of stack trace from previous location where exception was thrown ---
09/09/2022 09:00:20 AM 000153 ERROR at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
09/09/2022 09:00:20 AM 000154 ERROR at Ply.TplPrimitives.tryFinally@257.Invoke(AwaitableContinuation`3 this)
09/09/2022 09:00:20 AM 000155 ERROR at Ply.TplPrimitives.AwaitableContinuation`3.Invoke(Unit r)
09/09/2022 09:00:20 AM 000156 ERROR Inner exception:
09/09/2022 09:00:20 AM 000157 ERROR WebException
09/09/2022 09:00:20 AM 000158 ERROR The underlying connection was closed: An unexpected error occurred on a send.
09/09/2022 09:00:20 AM 000159 ERROR Call stack:
09/09/2022 09:00:20 AM 000160 ERROR at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
09/09/2022 09:00:20 AM 000161 ERROR at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
09/09/2022 09:00:20 AM 000162 ERROR Inner exception:
09/09/2022 09:00:20 AM 000163 ERROR PSInvalidOperationException
Do you know what could be the cause of this issue ? Thank you for your help.