question

arundevopschat-3183 avatar image
0 Votes"
arundevopschat-3183 asked XuDongPeng-MSFT commented

API Failed Error

How to solve below error? Getting error notification every minute

API Failed
API: <IP:port>/Service1.asmx/<service-name>
METHOD: POST,
body: System.Net.WebException: The operation has timed out
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at IOMSONLINEWithKey.IOMSONLINE.Service1.GetComplaintDetailsCA(String CANo)
at IOMSONLINEWithKey.Service1.GetComplaintDetailsCA(String key, String CANo)

Response Code: 500
Error: null

dotnet-aspnet-general
· 3
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.

Hi @arundevopschat-3183 ,
Just such an error message may not be able to determine your current problem. There are many reasons for this error. Have you configured the timeout duration for these services? And I found that IOMSONLINEWithKey.Service1.GetComplaintDetailsCA(String key, String CANo), are you accessing the database? If this is the case, there may be a problem with the database connection, such as the connection string?
If possible, could you provide more details? It will help us to help you find a solution to your problem.

0 Votes 0 ·

We have increased timeout.
Database is working fine as same database is used by 3 more application and is working fine.
Will changing string to stringbuilder will help

This api is using POST method
Connecting to database based on contract no fetching details

0 Votes 0 ·

Hi @arundevopschat-3183 ,
Is there a lot of data processing in the code? For example, multiple calculations of string objects result in multiple allocations of memory.
Do you clean up resources in a timely manner (release the connection back to the pool)?
The above are just my guesses. If possible, please provide more details.

0 Votes 0 ·

0 Answers