Closed arupbaroi closed 6 years ago
This issue doesn't contain enough information for us to try and reproduce the error. Can you please include more information about the exact steps that cause this error? Ideally, this would be a small standalone C# app that we can run.
Closing the issue because not able to replicate the issue again.
I am running a asp.net core api application inside a docker container which is FROM microsoft/aspnetcore:2.0-nanoserver-sac2016. In my app I am calling a public url (api running on azure) using HttpClient. Without docker I am able to get data from the url , but inside docker container I am getting the follwoing exception:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The server name or address could not be resolved at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.Tasks.RendezvousAwaitabled58.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 HON.SPS.SIOT.CA.REPORT.API.Utility.ReportDataClient.d 1.MoveNext() in C:\src\HON.SPS.SIOT.CA.REPORT.API\Utility\ReportDataClient.cs:line 60
--- 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 WebApplication1.Implementation.AssetReportMgr.d11.MoveNext() in C:\src\HON.SPS.SIOT.CA.REPORT.API\Implementation\AssetReportMgr.cs:line 166
--- 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 WebApplication1.Implementation.AssetReportMgr.d 10.MoveNext() in C:\src\HON.SPS.SIOT.CA.REPORT.API\Implementation\AssetReportMgr.cs:line 133
1.GetResult() 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.Runtime.CompilerServices.ConfiguredTaskAwaitable
1.ConfiguredTaskAwaiter.GetResult() at System.Net.Http.HttpClient.Steps to reproduce the issue
Expected behavior
HttpClient should work correctly. Because if I am running this app in local or any azure instance it is working fine. Same should be from docker windows container.
Actual behavior
I am getting exception which I have mentioned earlier.