Hi,
I don't think that IsClientConnect ed would work, I'll show some code:
public class ModuleTest : IHttpModule
{
public void Init(HttpApplic ation httpApp)
{
httpApp.BeginRe quest += new EventHandler(th is.OnBeginReque st);
httpApp.EndRequ est += new EventHandler(th is.OnEndRequest );
}
public void OnBeginRequest( object o, EventArgs ea)
{
HttpApplication httpApp = (HttpApplicatio n) o;
httpApp.Respons e.Write("BeginR equest started <br/>");
//and may perform also something else
}
//After the data has been sent to client,
//I want to call a specific method.
//The event EndRequest will be fired when the worker
//process has finished his job,
//and doesn't mean that the client has received data.
//So I tried the following:
public void OnEndRequest(ob ject o, EventArgs ea)
{
HttpApplication httpApp = (HttpApplicatio n) o;
while(httpApp.R esponse.IsClien tConnected)
{
}
httpApp.Respons e.Write("Client is no more connected<br/>");
}
}
But this did not work, it never returns :(
I hope that somebody would be able to help
Thanx
"Ravikanth[MVP]" <dv*********@ho tmail.com> wrote in message news:<0b******* *************** ******@phx.gbl> ...
Hi
The following example takes action if the client is
currently connected.
[C#]
if (Response.IsCli entConnected == true)
{
//...
}