How to use CassiniDev.Lib without the timeout?

 ̄綄美尐妖づ 提交于 2019-12-12 02:54:07

问题


I am using the CassiniDev.Lib4 DLL and recognized that the server stops responding after a certain amount of time.

Looking at the code in CassiniServer.cs I could see that a timeout of 60 seconds is set:

_server = new Server(port, virtualPath, applicationPath, ipAddress, hostname, 60000);

How can I avoid any timeout of the server? And why is there a timeout?

EDIT: Fiddler tells me: HTTP/1.1 502 Fiddler - Connection Failed Content-Type: text/html; charset=UTF-8 Connection: close Timestamp: 09:18:38.367 The socket connection to localhost failed. Es konnte keine Verbindung hergestellt werden, da der Zielcomputer die Verbindung verweigerte 127.0.0.1:1278

EDIT 2: I'm not sure anymore, that it has to do with an implemented timeout, because I kept time and can't recognize a 60 seconds time window. Sometimes the server didn't respond after 40 seconds after the last click. Or could it be, that a cached website was loaded and the last click didn't trigger a request?

I am really looking forward to your hints!

Best regards,

KB


回答1:


As a quick walkaround I uncommented the code of DecrementRequestCount() and IncrementRequestCount() in Server.cs. I think there still is a bug in CassiniDev.Lib4. Cassini now seems to run properly without stopping responding.

I am sorry, that I didn't had more time to dive deeper into this, but I would appreciate any hints or fixes for this.



来源:https://stackoverflow.com/questions/9115851/how-to-use-cassinidev-lib-without-the-timeout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!