ASP.Net Core 2 Web API method fails calling SOAP Web Service call with SiteMinder agents Enabled
From @nilanthasj on September 17, 2018 17:28
General Information
A .NET Core Web API project that consumes a SOAP web service. The methods that consume SOAP works well in the deployment server, perfect. When the SiteMinder agents (CA SiteMinder Web Agent Module and CA SiteMinder Web Agent Module-32) enabled, SOAP call fails.
Can somebody help me to identify/fix this issue?
Information
SOAP web service call fails in the async call (Please see the code) Method
// Calls SOAP endpoint
Task<POCOClass> pocoOutput = await serviceClient.SAP_DATAService_LISTAsync(request)
pocoOutput. Wait()
Inner Exception
System.ServiceModel.CommunicationException: An error occurred while sending the request.
---> System.Net.Http.HttpRequestException: An error occurred while sending the request.
---> System.Net.Http.WinHttpException: Not enough storage is available to complete this operation
at System.Net.Http.WinHttpHandler.ThrowOnInvalidHandle(SafeWinHttpHandle handle)
at System.Net.Http.WinHttpHandler.EnsureSessionHandleExists(WinHttpRequestState state)
at System.Net.Http.WinHttpHandler.<StartRequest>d__105.MoveNext()
--- End of inner exception stack trace ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.ServiceModel.Channels.ServiceModelHttpMessageHandler.<SendAsync>d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.ServiceModel.Channels.HttpChannelFactory`1.HttpClientRequestChannel.HttpClientChannelAsyncRequest.<SendRequestAsync>d__13.MoveNext()
Environment data
Product Information:
Version: 2.1.202
Commit SHA-1 hash: 281caedada
Runtime Environment:
OS Name: Windows
OS Platform: Windows
Base Path: C:\Program Files\dotnet\sdk\2.1.202\
Microsoft .NET Core Shared Framework Host
Version : 2.0.9
Build : 1632fa1589b0eee3277a8841ce1770e554ece037
Copied from original issue: dotnet/cli#10015
Looks like some error from OS networking stack "Not enough storage is available to complete this operation". The easiest option is to upgrade to .NET Core 2.1 which contains new networking stack implementation. Let's hope it works there.
Note that .NET Core 2.0 is going out of support in 2 weeks.
@karelz Thank you for the response The strange thing i experienced is, this code work correctly without SiteMinder agents..
The fact it works in some environments does not mean there are no bugs. Or the buggy environment has a bug in itself, causing the fialures (some antiviruses, viruses and other invasive SW sometimes can cause mysterious bugs in your apps).
I will close it for now as it is not actionable. If you are able to narrow it down to something specific, that can be ideally reproduced elsewhere, feel free to reopen / ping me here.
Some additional general tricks: Run it under debugger in the environment where it fails. Add some logging. Look at OS logging (ETW events). Try TTD (Time-travel Debugger). Or just play with your environments until problem is out. Or you can contact (paid) Microsoft support to get to the bottom of this in the OS.