HttpResponseWrapper Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encapsulates the HTTP intrinsic object that provides HTTP-response information from an ASP.NET operation.
public ref class HttpResponseWrapper : System::Web::HttpResponseBase
public class HttpResponseWrapper : System.Web.HttpResponseBase
type HttpResponseWrapper = class
inherit HttpResponseBase
Public Class HttpResponseWrapper
Inherits HttpResponseBase
- Inheritance
Remarks
The HttpResponseWrapper class derives from the HttpResponseBase class and serves as a wrapper for the HttpResponse class. This class exposes the functionality of the HttpResponse class while also exposing the HttpResponseBase type. The HttpResponseBase class enables you to replace the original implementation of the HttpResponse class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.
Constructors
HttpResponseWrapper(HttpResponse) |
Initializes a new instance of the HttpResponseWrapper class. |
Properties
Buffer |
Gets or sets a value that indicates whether to buffer output and send it after the complete response has finished processing. |
BufferOutput |
Gets or sets a value that indicates whether to buffer output and send it after the complete page has finished processing. |
Cache |
Gets the caching policy (such as expiration time, privacy settings, and vary clauses) of the current Web page. |
CacheControl |
Gets or sets the |
Charset |
Gets or sets the HTTP character set of the current response. |
ClientDisconnectedToken |
Gets a CancellationToken object that is tripped when the client disconnects. |
ClientDisconnectedToken |
Gets a CancellationToken object that is tripped when the client disconnects. (Inherited from HttpResponseBase) |
ContentEncoding |
Gets or sets the content encoding of the current response. |
ContentType |
Gets or sets the HTTP MIME type of the current response. |
Cookies |
Gets the response cookie collection. |
Expires |
Gets or sets the number of minutes before a page that is cached on the client or proxy expires. If the user returns to the same page before it expires, the cached version is displayed. Expires is provided for compatibility with earlier versions of ASP. |
ExpiresAbsolute |
Gets or sets the absolute date and time at which cached information expires in the cache. ExpiresAbsolute is provided for compatibility with earlier versions of ASP. |
Filter |
Gets or sets a filter object that is used to modify the HTTP entity body before transmission. |
HeaderEncoding |
Gets or sets the encoding for the header of the current response. |
Headers |
Gets the collection of response headers. |
HeadersWritten |
Gets a value indicating whether the response headers have been written. |
HeadersWritten |
Gets a value indicating whether the response headers have been written. (Inherited from HttpResponseBase) |
IsClientConnected |
Gets a value that indicates whether the client is connected to the server. |
IsRequestBeingRedirected |
Gets a value that indicates whether the client is being redirected to a new location. |
Output |
Gets the object that enables output of text to the outgoing HTTP response stream. |
OutputStream |
Provides binary output to the outgoing HTTP content body. |
RedirectLocation |
Gets or sets the value of the HTTP |
Status |
Sets the |
StatusCode |
Gets or sets the HTTP status code of the output that is returned to the client. |
StatusDescription |
Gets or sets the HTTP status message of the output that is returned to the client. |
SubStatusCode |
Gets or sets a value that qualifies the status code of the response. |
SupportsAsyncFlush |
Gets a value that indicates whether the connection supports asynchronous flush operations. |
SupportsAsyncFlush |
Gets a value that indicates whether the connection supports asynchronous flush operation. (Inherited from HttpResponseBase) |
SuppressContent |
Gets or sets a value that indicates whether to send HTTP content to the client. |
SuppressDefaultCacheControlHeader |
Gets or sets a value indicating whether to suppress the default Cache Control: private header for the current HTTP response. |
SuppressDefaultCacheControlHeader |
Gets or sets a value indicating whether to suppress the default |
SuppressFormsAuthenticationRedirect |
Gets or sets a value that specifies whether forms authentication redirection to the login page should be suppressed. |
SuppressFormsAuthenticationRedirect |
Gets or sets a value that specifies whether forms authentication redirection to the login page should be suppressed. (Inherited from HttpResponseBase) |
TrySkipIisCustomErrors |
Gets or sets a value that specifies whether IIS 7.0 custom errors are disabled. |
Methods
AddCacheDependency(CacheDependency[]) |
When overridden in a derived class, associates cache dependencies with the response that enable the response to be invalidated if it is cached and if the specified dependencies change. |
AddCacheItemDependencies(ArrayList) |
Makes the validity of a cached response dependent on the specified items in the cache. |
AddCacheItemDependencies(String[]) |
Makes the validity of a cached item dependent on the specified items in the cache. |
AddCacheItemDependency(String) |
Makes the validity of a cached response dependent on the specified item in the cache. |
AddFileDependencies(ArrayList) |
Adds file names to the collection of file names on which the current response is dependent. |
AddFileDependencies(String[]) |
Adds an array of file names to the collection of file names on which the current response is dependent. |
AddFileDependency(String) |
Adds a single file name to the collection of file names on which the current response is dependent. |
AddHeader(String, String) |
Adds an HTTP header to the current response. This method is provided for compatibility with earlier versions of ASP. |
AddOnSendingHeaders(Action<HttpContextBase>) |
Registers a callback that the ASP.NET runtime will invoke immediately before response headers are sent for this request. |
AddOnSendingHeaders(Action<HttpContextBase>) |
Registers a callback that the ASP.NET runtime will invoke immediately before response headers are sent for this request. (Inherited from HttpResponseBase) |
AppendCookie(HttpCookie) |
Adds an HTTP cookie to the HTTP response cookie collection. |
AppendHeader(String, String) |
Adds an HTTP header to the current response. |
AppendToLog(String) |
Adds custom log information to the Internet Information Services (IIS) log file. |
ApplyAppPathModifier(String) |
Adds a session ID to the virtual path if the session is using Cookieless session state, and returns the combined path. |
BeginFlush(AsyncCallback, Object) |
Sends the currently buffered response to the client. |
BeginFlush(AsyncCallback, Object) |
Sends the currently buffered response to the client. (Inherited from HttpResponseBase) |
BinaryWrite(Byte[]) |
Writes a string of binary characters to the HTTP output stream. |
Clear() |
Clears all headers and content output from the current response. |
ClearContent() |
Clears all content output from the current response. |
ClearHeaders() |
Clears all headers from the current response. |
Close() |
Closes the socket connection to a client. |
DisableKernelCache() |
Disables kernel caching for the current response. |
DisableUserCache() |
Disables IIS user-mode caching for this response. |
DisableUserCache() |
Disables IIS user-mode caching for this response. (Inherited from HttpResponseBase) |
End() |
Sends all currently buffered output to the client, stops execution of the requested process, and raises the EndRequest event. |
EndFlush(IAsyncResult) |
Completes an asynchronous flush operation. |
EndFlush(IAsyncResult) |
Completes an asynchronous flush operation. (Inherited from HttpResponseBase) |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Flush() |
Sends all currently buffered output to the client. |
FlushAsync() |
Asynchronously sends all currently buffered output to the client. |
FlushAsync() |
Asynchronously sends all currently buffered output to the client. (Inherited from HttpResponseBase) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
Pics(String) |
Appends an HTTP |
PushPromise(String) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. |
PushPromise(String) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. (Inherited from HttpResponseBase) |
PushPromise(String, String, NameValueCollection) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. |
PushPromise(String, String, NameValueCollection) |
Supports applications sending push promises to HTTP 2.0 clients. For more information, see HTTP/2 Specification Section 8.2: Server Push. (Inherited from HttpResponseBase) |
Redirect(String) |
Redirects a request to the specified URL. |
Redirect(String, Boolean) |
Redirects a request to the specified URL and specifies whether execution of the current process should terminate. |
RedirectPermanent(String) |
Performs a permanent redirect from the requested URL to the specified URL. |
RedirectPermanent(String) |
Performs a permanent redirect from the requested URL to the specified URL. (Inherited from HttpResponseBase) |
RedirectPermanent(String, Boolean) |
Performs a permanent redirect from the requested URL to the specified URL, and provides the option to complete the response. |
RedirectPermanent(String, Boolean) |
Performs a permanent redirect from the requested URL to the specified URL, and provides the option to complete the response. (Inherited from HttpResponseBase) |
RedirectToRoute(Object) |
Redirects a request to a new URL by using the specified route parameter values. |
RedirectToRoute(Object) |
Redirects the request to a new URL by using route parameter values. (Inherited from HttpResponseBase) |
RedirectToRoute(RouteValueDictionary) |
Redirects a request to a new URL by using the specified route parameter values. |
RedirectToRoute(RouteValueDictionary) |
Redirects the request to a new URL by using route parameter values. (Inherited from HttpResponseBase) |
RedirectToRoute(String) |
Redirects a request to a new URL by using the specified route name. |
RedirectToRoute(String) |
Redirects the request to a new URL by using a route name. (Inherited from HttpResponseBase) |
RedirectToRoute(String, Object) |
Redirects a request to a new URL by using the specified route name and route parameter values. |
RedirectToRoute(String, Object) |
Redirects the request to a new URL by using route parameter values and a route name. (Inherited from HttpResponseBase) |
RedirectToRoute(String, RouteValueDictionary) |
Redirects a request to a new URL by using the specified route name and route parameter values. |
RedirectToRoute(String, RouteValueDictionary) |
Redirects the request to a new URL by using route parameter values and a route name. (Inherited from HttpResponseBase) |
RedirectToRoutePermanent(Object) |
Performs a permanent redirection from a requested URL to a new URL by using the specified route parameter values. |
RedirectToRoutePermanent(Object) |
Performs a permanent redirection from the requested URL to a new URL by using route parameter values. (Inherited from HttpResponseBase) |
RedirectToRoutePermanent(RouteValueDictionary) |
Performs a permanent redirection from a requested URL to a new URL by using the specified route parameter values. |
RedirectToRoutePermanent(RouteValueDictionary) |
Performs a permanent redirection from the requested URL to a new URL by using route parameter values. (Inherited from HttpResponseBase) |
RedirectToRoutePermanent(String) |
Performs a permanent redirection from a requested URL to a new URL by using the specified route name. |
RedirectToRoutePermanent(String) |
Performs a permanent redirection from the requested URL to a new URL by using a route name. (Inherited from HttpResponseBase) |
RedirectToRoutePermanent(String, Object) |
Performs a permanent redirection from a requested URL to a new URL by using a route name and route parameter values that correspond to the new URL. |
RedirectToRoutePermanent(String, Object) |
Performs a permanent redirection from the requested URL to a new URL by using the route parameter values and the name of the route that correspond to the new URL. (Inherited from HttpResponseBase) |
RedirectToRoutePermanent(String, RouteValueDictionary) |
Performs a permanent redirection from a requested URL to a new URL by using the specified route name and route parameter values. |
RedirectToRoutePermanent(String, RouteValueDictionary) |
Performs a permanent redirection from the requested URL to a new URL by using route parameter values and a route name. (Inherited from HttpResponseBase) |
RemoveOutputCacheItem(String) |
Removes from the cache all cached items that are associated with the specified path. |
RemoveOutputCacheItem(String, String) |
Uses the specified output-cache provider to remove all output-cache artifacts that are associated with the specified path. |
RemoveOutputCacheItem(String, String) |
Uses the specified output-cache provider to remove all output-cache artifacts that are associated with the specified path. (Inherited from HttpResponseBase) |
SetCookie(HttpCookie) |
Updates an existing cookie in the cookie collection. |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
TransmitFile(String) |
Writes the specified file to the HTTP response output stream, without buffering it in memory. |
TransmitFile(String, Int64, Int64) |
Writes the specified part of a file to the HTTP response output stream, without buffering it in memory. |
Write(Char) |
Writes a character to an HTTP response output stream. |
Write(Char[], Int32, Int32) |
Writes the specified array of characters to the HTTP response output stream. |
Write(Object) |
Writes the specified object to the HTTP response stream. |
Write(String) |
Writes the specified string to the HTTP response output stream. |
WriteFile(IntPtr, Int64, Int64) |
Writes the specified file to the HTTP response output stream. |
WriteFile(String) |
Writes the contents of the specified file to the HTTP response output stream as a file block. |
WriteFile(String, Boolean) |
Writes the contents of the specified file to the HTTP response output stream and specifies whether the content is written as a memory block. |
WriteFile(String, Int64, Int64) |
Writes the specified file to the HTTP response output stream. |
WriteSubstitution(HttpResponseSubstitutionCallback) |
Inserts substitution blocks into the response, which enables dynamic generation of regions for cached output responses. |