Freigeben über


Debug: WebAPI/Web Service fails to hit Load Balancer when called from Outlook add-in

Recently i worked with this app developer, who created a custom Outlook add-in through which they try to make use of custom ASP.Net Web Service/Web API using REST call.

This URL works fine from the browser on a machine running the Outlook with the Add-in installed. But it fails with the below error from within the Outlook Add-In when they try make REST API call against their custom ASP.Net Web Service/Web API:

Exception : ThisAddIn_Startup:System.Net.WebException: The remote name could not be resolved: 'customdomain.com'
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)

During the troubleshooting, we isolated the issue out of Outlook APIs and tried isolating other pieces involved in the given scenario.

Upon further debugging, fiddler/network logs clearly pointed out the error happens when we try to call WebAPI/Web Service from add-in which fails to hit the load balancer. So we worked with their networking team/vendor, configured their load balancer to work correctly. It helped to call the WebAPI/Web Service from their custom Outlook add-in without any problem.

Hope this helps.