简体   繁体   中英

.Net web api self hosting

I developed a console application that is stored as a web service. In this console, I host a self-hosted web app service. Also, I open a thread that opens a web socket with another program (HTTP, port 443).... Now, when I initialize the web service, I can reach the self-hosted service, and the web socket works well. Now after 2-3 hours the web socket is closed and this is the exception that i get:

"An established connection was aborted by the software in your host machine".

Also, I get the following error:

"Exception: Error message: Socket not connected"

..

Has anyone an idea for this?

Have you tried turning your firewall off just to make sure? Also make sure that HttpWebRequest.KeepAlive is turned on

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