locked
System.Net.WebException RRS feed

  • Question

  • Communication between websites is generating an exception, but I'm able to go to the destination site manually with no errors.

    An error occurred while sending the request.The remote name could not be resolved: 'userapi.volvocarsacademy.com'

    System.Net.Http.HttpRequestException:
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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 Microsoft.Rest.RetryDelegatingHandler+<>c__DisplayClass11_0+<<SendAsync>b__1>d.MoveNext (Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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 Microsoft.Rest.RetryDelegatingHandler+<SendAsync>d__11.MoveNext (Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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.Net.Http.HttpClient+<FinishSendAsync>d__58.MoveNext (System.Net.Http, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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.ValidateEnd (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
       at SparkIgnit3.ClientApis.UserApi.Entities+<GetWithHttpMessagesAsync>d__5.MoveNext (SparkIgnit3.ClientApis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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 SparkIgnit3.ClientApis.UserApi.EntitiesExtensions+<GetAsync>d__1.MoveNext (SparkIgnit3.ClientApis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (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 SparkIgnit3.ClientApis.UserApi.EntitiesExtensions.Get (SparkIgnit3.ClientApis, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.ClientApis.Helpers.UserApi.EntitiesHelper.<GetList>z__OriginalMethod (SparkIgnit3.ClientApis.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.ClientApis.Helpers.UserApi.EntitiesHelper+<GetList>c__Binding.Invoke (SparkIgnit3.ClientApis.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at PostSharp.Aspects.Internals.MethodInterceptionArgsImpl`1.Proceed (PostSharp, Version=5.0.32.0, Culture=neutral, PublicKeyToken=b13fd38b8f9c99d7)
       at SparkIgnit3.Aspects.ApiAutoRetry.Attributes.ApiAutoRetryAttribute.OnInvoke (SparkIgnit3.Aspects.ApiAutoRetry, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.ClientApis.Helpers.UserApi.EntitiesHelper.GetList (SparkIgnit3.ClientApis.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.Volvo.Web.Helpers.UserHelper.GetUserFromApi (SparkIgnit3.Volvo.Web, Version=1.0.6470.25935, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.Volvo.Web.Helpers.UserHelper.GetUserModelFromApi (SparkIgnit3.Volvo.Web, Version=1.0.6470.25935, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.Volvo.Web.Helpers.UserHelper.GetUserModel (SparkIgnit3.Volvo.Web, Version=1.0.6470.25935, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.Volvo.Web.Controllers.LogonController.SignOn (SparkIgnit3.Volvo.Web, Version=1.0.6470.25935, Culture=neutral, PublicKeyToken=null)
       at SparkIgnit3.Volvo.Web.Controllers.LogonController.Index (SparkIgnit3.Volvo.Web, Version=1.0.6470.25935, Culture=neutral, PublicKeyToken=null)
       at lambda_method (Anonymously Hosted DynamicMethods Assembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
       at System.Web.Mvc.ActionMethodDispatcher.Execute (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.ReflectedActionDescriptor.Execute (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39 (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`2.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker+AsyncInvocationWithFilters+<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32 (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21+<>c__DisplayClass2b.<BeginInvokeAction>b__1c (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__DisplayClass21.<BeginInvokeAction>b__1e (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResult`1.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Controller.<BeginExecuteCore>b__1d (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Controller.EndExecuteCore (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Controller.<BeginExecute>b__15 (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Controller.EndExecute (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5 (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid`1.CallEndDelegate (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase`1.End (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.MvcHandler.EndProcessRequest (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest (System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
       at System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
       at System.Web.HttpApplication.ExecuteStep (System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)
    Inner exception System.Net.WebException handled at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess:
       at System.Net.HttpWebRequest.EndGetResponse (System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
       at System.Net.Http.HttpClientHandler.GetResponseCallback (System.Net.Http, Version=4.1.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a)

    • Moved by Swikruti Bose Friday, September 22, 2017 5:08 AM Best suited in Web App
    Thursday, September 21, 2017 10:49 PM

All replies

  • Could you explain bit more about your scenario? What exactly are you trying to do?

    You can try to set proxy for your project as below and see if it helps,

    <system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">  </defaultProxy>
    </system.net>

    Also, if you have used the redirect URL, you can check for the same configuration whether it has mentioned properly or not.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.


    Friday, September 22, 2017 5:24 AM
  • I have 4 websites setup in Azure under the same App Service Plan.  All Data for these websites comes from another 12 API websites setup in another App Service Plan.  The UserApi is used by almost everything to ensure the user requesting the data is authenticated and has access.

    Each of the 4 websites calls the same exact API sites, but each API has custom domains setup so that the API seems to be on the same domain as the actual client website. It appears that DNS names were failing to resolve in specific areas yesterday afternoon for 3 of the 4 client websites. (Seems that I'm not allowed to post images even though I have verified my account...) The first screenshot shows the failures for website1 (userapi.client1.com). The second screenshot shows that everything was working as expected for website2 (userapi.client2.com). userapi.client1.com and userapi.client2.com are just custom domains on top of the same web app. Also the availability tests showed that the failures were only coming from FL and VA, but CA, IL and TX all were working as expected.

    I have an Azure support ticket open with the number 117092116379018, but in that ticket I was told that they may need to open an internal ticket to work with the Azure Networking team.


    Friday, September 22, 2017 2:01 PM
  • We have checked on the ticket details and would suggest you to wait for an update from our team.

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    Saturday, September 23, 2017 9:47 AM