How to use CassiniDev.Lib without the timeout?

Feb 2, 2012 at 3:02 PM
Edited Feb 3, 2012 at 7:52 AM

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?

Looking forward to your hints!

Best regards,

KB

 

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?

Feb 3, 2012 at 12:16 PM

As a quick walkaround I uncommented the code of DecrementRequestCount() and IncrementRequestCount() in Server.cs. I think there still is a bug in these functionality. 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.

Coordinator
Jun 11, 2012 at 12:38 PM

the timeout functionality was to ensure that when using cassinidev for testing that orphaned or idle servers would shut down and release the port.

i had thought we had driven out any bugs around that feature but it is worth another look.

Coordinator
Jul 14, 2012 at 5:52 PM

the use case for timeout involved the console version, which until someone screams foul, has been removed from the project. So, as of now, there is no timeout to worry about.