Hi,
We are getting error message when connecting to Smater Mail API
Inner Exception: {"Unable to read data from the transport connection: An
existing connection was forcibly closed by the remote host."}
Message: The underlying connection was closed: An unexpected error occurred
on a send.

Mukil VendhanRank #2,971 · 486 reputationPosted Sep 12, 2017, 5:40 AM EDT
The underlying connection was closed: An unexpected error occurred on a receive.
Resolution
To resolve this problem, make sure that you are using the most recent version of the .NET Framework.
Add a method to the class to override the
GetWebRequestmethod. This change lets you access the HttpWebRequest object. If you are using Microsoft Visual C#, the new method must be similar to the following.class MyTestService:TestService.TestService { protected override WebRequest GetWebRequest(Uri uri) { HttpWebRequest webRequest = (HttpWebRequest) base.GetWebRequest(uri); //Setting KeepAlive to false webRequest.KeepAlive = false; return webRequest; } }Excerpt from KB915599: You receive one or more error messages when you try to make an HTTP request in an application that is built on the .NET Framework 1.1 Service Pack 1.
sumesh npRank #4,292 · 353 reputationPosted Sep 12, 2017, 6:04 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts