question

prasadk-6267 avatar image
0 Votes"
prasadk-6267 asked DuaneArnold-0443 edited

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

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())

         {

             try
             {

                 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 }

dotnet-csharpdotnet-aspnet-webapi
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

DuaneArnold-0443 avatar image
0 Votes"
DuaneArnold-0443 answered DuaneArnold-0443 edited
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.