I am trying to log what is happening when the Client gets a time out on a Web Service call.
Take a look at the HelloWorld code below. This is what I wish to do, but it seems IsClientConnected does not work as it allways return true.
[WebMethod]
public string HelloWorld() {
//.. Do the Webservice stuff
if (!Context.Response.IsClientConnected) {
//Log some vital info about this call that timed out...
}
return "The WebService Result";
}
Does anyone know another way to check the state of the Web Service call?
When clients disconnect from a webservice call, there are no Exceptions thrown in the Web Service. The code continues to run untill it is done and then returns its result into nothingness (as the connection is closed).