I created a web api using c#, but when I pushed the code in production, users are getting the following error
An existing connection was forcibly closed by the remote host
when I debug with all possibilities, I find that my Route contains something like this
[Route("{string}/{int=-1}/{int2=-1}")]
but when I debug, I am not getting the error in localhost
,
what might be the issue here?
try to use wireshark to see what the exact issue and why is it persisting.
basically, it means that the remote side closed the connection (most commonly happens during TCP/IP RST
packet) and the reason can vary:
If you said that when you debug everything is working, I'd recommend using the wireshark first, outside of debug mode, before taking any action in order to estimate the cause for the issue and possible solution in order to solve it.