Response.IsClientConnected in Asynchronous Web Service
Hello, I'm developping a web service.
The role of this one is maintaining a client list and and sending messages to them. In fact this web service is like a P2P server.
I found a solution but it is only working on my computer (XP - IIS 5.2) and it do not work on the server (2003 - IIS 6.0) ...
This solution is to store the HttpContext for each call of the WaitMessage() method (this one send a response in an undeterminated time to the client - perhaps 2 hours after the request...).
Then a thread is browsing the client list and test if the client is still connected:
[code]
for(...)
client = ClientList[i];
if(client.Context.Response.IsClientConnected==false)
{
// delete of the client
}
[/code]
The problem is that this method (IsClientConnected) always returns true, wether the client is disconnected or not ! (and only with the server - it's works on my computer)
Does somebody know why?
I tried then to get the socket used by HttpResponse , and then tried to test the state (ESTABLISHED?) of this one... but i didn't find how to get the socket...
Help...