简体   繁体   中英

c# Webservices Error

I have ac# web application that calls an API, It was working fine until past two weeks since then it started failing with below error.

An existing connection was forcibly closed by the remote host

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host.

When I try the same code with c# console application, it is working fine without any errors.

Can anyone please let me know why am I getting the error?

This problem can be fixed if you increase the corespond binding attribute elements both on client and server sides. I looked into the issue and it seems to be the most relevant suggestion to fix this.

Here are some good forums where this problem is discussed in more detail.

https://social.msdn.microsoft.com/Forums/vstudio/en-US/7b43e645-02f7-4cec-b669-55867c9bb56c/systemnetsocketssocketexception-an-existing-connection-was-forcibly-closed-by-the-remote-host?forum=wcf

https://forums.asp.net/t/1517757.aspx?WCF+issues+sending+large+data+An+existing+connection+was+forcibly+closed+by+the+remote+host+

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM