System.Web.HttpResponse.Close Method

Closes the socket connection to a client.


public void Close ()


This method terminates the connection to the client in an abrupt manner and is not intended for normal HTTP request processing. The method sends a reset packet to the client, which can cause response data that is buffered on the server, the client, or somewhere in between to be dropped.

You might use this method in response to an attack by a malicious HTTP client. However, typically you should call HttpApplication.CompleteRequest instead if you want to jump ahead to the HttpApplication.EndRequest event and send a response to the client.


Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0,