503 error in after deploying in task scheduler(production only).Its not replication from Local development server/Code

prasad k 86 Reputation points

Calling one api http://10.xxx.xxx.xx:xx/web/services/xxxxx with json list as a parameter, It working from local machine (c# program and postman also).

using (var client = new HttpClient())



                var jsonpar = JsonConvert.SerializeObject(new
                    param= objorders

                var url = config.weburl;

                var stringContent1 = new StringContent(jsonpar , Encoding.UTF8, "application/json");

                var apiResponse1 = client.PostAsync('http://10.xxxxx/web/xxxx', stringContent1 )
                if(apiResponse1 .result.issuucesscode)


But when deploying same code to task scheduler in server, getting below response.

Error:ServiceUnavailableStatusCode: 503, Reason Phrase: 'Service Unavailable', Version: 1.1, Content: System.Net.Http.StreamContent, Headers: { Pragma: no-cache Proxy-Connection: Keep-Alive Connection: Keep-Alive Cache-Control: no-cache Content-Length: 859 Content-Type: text/html; charset=utf-8 }

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
8,194 questions
ASP.NET: A set of technologies in the .NET Framework for building web applications and XML web services.API: A software intermediary that allows two applications to interact with each other.
206 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Duane Arnold 3,216 Reputation points
    0 comments No comments