3
Answers

Third party web services

Hi, I am consuming netsuite webservies in MVC 5.
 
facing one error could u any one help me?
 
error: An existing connection was forcibly closed by the remote host
Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
 
WebResponse webResponse = webRequest.GetResponse();
Answers (3)
1
Rajkiran Swain

Rajkiran Swain

NA 33.9k 372.4k 7y
I solved the same problem with increasing cache limit of iis root entry. you can also disable caching. Hope it helps.
1
Ankit Sharma

Ankit Sharma

NA 8.8k 140.8k 7y
Hi Pavan,
 
Since it is a third party webservice so may be the reason for this exception is that your response time is a little lesser than time required by the webservice method to complete. So try to increase the timeout in your app.config.
Please refer to these links
 
https://stackoverflow.com/questions/9117628/error-consuming-web-service-an-existing-connection-was-forcibly-closed
 
https://www.outsystems.com/forums/discussion/15641/tip-the-underlying-connection-was-closed-an-unexpected-error-occurred-on-a-rece/
 
Hope this helps 
0
Pavan Birajdar

Pavan Birajdar

NA 5 199 7y
I am consumming it Dynamically without adding service refrence.
is there any credentials issue.