Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

HttpResponse.Close Method

Closes the socket connection to a client.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

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.

However, typically you should call CompleteRequest instead if you want to jump ahead to the EndRequest event and send a response to the client.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
Show:
© 2015 Microsoft