The EndGetContext method is called, usually within an application-defined callback method invoked by a delegate, to obtain the HttpListenerContext object that contains an incoming client request and its associated response. This method completes an operation previously started by calling the BeginGetContext method. If the operation has not completed, this method blocks until it does.
Because calling the EndGetContext method requires the HttpListener object, this object is typically passed into a callback method by using the state object passed into the BeginGetContext method. You can obtain this state object by using the AsyncState property of the asyncResult object.
For detailed information about using the asynchronous programming model, see Calling Synchronous Methods Asynchronously
Notes to Callers
This member outputs trace information when you enable network tracing in your application. For more information, see
Network Tracing.