Fix httpclient.postasync one or more error message

Praveen Chandra 20 Reputation points
2023-08-04T03:47:18.16+00:00

Hi team, at my asp.net mvc webapi application integrated third party api for sending request using httpclient.postasync method with request body. It works locally at iis side getting response 200. but failing at azure web app services, error message displaying like “one or more errors:: system.task.. Boolean….” Error code 500. At stack trace it was showing at line postasync method. Also please note that same publish working in another web app service.

I have tried another approach and failed by using httpwebrequest

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,672 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 27,946 Reputation points Microsoft Employee
    2023-08-07T19:39:00.2733333+00:00

    @Anonymous , Thanks for the follow-up and update.

    Based on your last comment, I understand you have resolved the issue.
    Glad to know that the issue is resolved.

    You may always checkout: Troubleshoot virtual network integration with Azure App Service

    To benefit the community, I can post a summary of this issue:

    Symptom:

    Upon deploying ASP.NET MVC WebAPI application to Azure Web App services, using the HttpClient.PostAsync method to send requests to a third-party API results in an error. While the process works smoothly on a local IIS server with a successful 200 response, in the Azure environment, the operation fails with an error message indicating "one or more errors:: system.task.. Boolean…," and an associated error code of 500.
    The same publish works fine another Azure WebApps.

    Fix: (by Cherryinfy)

    The issue was arising due to the integration of the networking Virtual Network (VNet). After making certain modifications to the VNet configuration, the API calls are now functioning correctly.

    Kindly let us know, thanks for your cooperation!
    (I'll convert this comment to answer)

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.