Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

HttpServerUtilityWrapper Class

Encapsulates the HTTP intrinsic object that provides helper methods for processing Web requests.

System.Object
  System.Web.HttpServerUtilityBase
    System.Web.HttpServerUtilityWrapper

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)
public class HttpServerUtilityWrapper : HttpServerUtilityBase

The HttpServerUtilityWrapper type exposes the following members.

  NameDescription
Public methodHttpServerUtilityWrapperInitializes a new instance of the HttpServerUtilityWrapper class.
Top
  NameDescription
Public propertyMachineNameGets the server's computer name. (Overrides HttpServerUtilityBase.MachineName.)
Public propertyScriptTimeoutGets or sets the request time-out value in seconds. (Overrides HttpServerUtilityBase.ScriptTimeout.)
Top
  NameDescription
Public methodClearErrorClears the most recent exception. (Overrides HttpServerUtilityBase.ClearError().)
Public methodCreateObject(String)Creates a server instance of a COM object that is identified by the object's programmatic identifier (ProgID). (Overrides HttpServerUtilityBase.CreateObject(String).)
Public methodCreateObject(Type)Creates a server instance of a COM object that is identified by the object's type. (Overrides HttpServerUtilityBase.CreateObject(Type).)
Public methodCreateObjectFromClsidCreates a server instance of a COM object that is identified by the object's class identifier (CLSID). (Overrides HttpServerUtilityBase.CreateObjectFromClsid(String).)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecute(String)Executes the handler for the specified virtual path in the context of the current process. (Overrides HttpServerUtilityBase.Execute(String).)
Public methodExecute(String, Boolean)Executes the handler for the specified virtual path in the context of the current process and specifies whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.Execute(String, Boolean).)
Public methodExecute(String, TextWriter)Executes the handler for the specified virtual path in the context of the current process, using a TextWriter instance to capture output from the executed handler. (Overrides HttpServerUtilityBase.Execute(String, TextWriter).)
Public methodExecute(IHttpHandler, TextWriter, Boolean)Executes the specified handler in the context of the current process, using a TextWriter instance to capture output from the executed handler and a value that specifies whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.Execute(IHttpHandler, TextWriter, Boolean).)
Public methodExecute(String, TextWriter, Boolean)Executes the handler for the specified virtual path in the context of the current request, using a TextWriter instance to capture output from the page and a value that indicates whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.Execute(String, TextWriter, Boolean).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetLastErrorReturns the most recent exception. (Overrides HttpServerUtilityBase.GetLastError().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodHtmlDecode(String)Decodes an HTML-encoded string and returns the decoded string. (Overrides HttpServerUtilityBase.HtmlDecode(String).)
Public methodHtmlDecode(String, TextWriter)Decodes an HTML-encoded string and returns the results in a stream. (Overrides HttpServerUtilityBase.HtmlDecode(String, TextWriter).)
Public methodHtmlEncode(String)HTML-encodes a string and returns the encoded string. (Overrides HttpServerUtilityBase.HtmlEncode(String).)
Public methodHtmlEncode(String, TextWriter)HTML-encodes a string and sends the resulting output to an output stream. (Overrides HttpServerUtilityBase.HtmlEncode(String, TextWriter).)
Public methodMapPathReturns the physical file path that corresponds to the specified virtual path on the Web server. (Overrides HttpServerUtilityBase.MapPath(String).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTransfer(String)Terminates execution of the current process and starts execution of a page or handler that is specified with a URL. (Overrides HttpServerUtilityBase.Transfer(String).)
Public methodTransfer(IHttpHandler, Boolean)Terminates execution of the current process and starts execution of a new request, using a custom HTTP handler and a value that specifies whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.Transfer(IHttpHandler, Boolean).)
Public methodTransfer(String, Boolean)Terminates execution of the current page and starts execution of a different page or handler by using the specified URL and a value that specifies whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.Transfer(String, Boolean).)
Public methodTransferRequest(String)Asynchronously executes the end point at the specified URL. (Overrides HttpServerUtilityBase.TransferRequest(String).)
Public methodTransferRequest(String, Boolean)Asynchronously executes the endpoint at the specified URL and specifies whether to clear the QueryString and Form collections. (Overrides HttpServerUtilityBase.TransferRequest(String, Boolean).)
Public methodTransferRequest(String, Boolean, String, NameValueCollection)Asynchronously executes the endpoint at the specified URL by using the specified HTTP method and headers. (Overrides HttpServerUtilityBase.TransferRequest(String, Boolean, String, NameValueCollection).)
Public methodTransferRequest(String, Boolean, String, NameValueCollection, Boolean)Performs an asynchronous execution of the specified URL using the specified HTTP method, headers, path, and options to preserve form values and preserve the user identity. (Overrides HttpServerUtilityBase.TransferRequest(String, Boolean, String, NameValueCollection, Boolean).)
Public methodUrlDecode(String)Decodes a URL-encoded string and returns the decoded string. (Overrides HttpServerUtilityBase.UrlDecode(String).)
Public methodUrlDecode(String, TextWriter)Decodes a URL-encoded string and sends the resulting output to a stream. (Overrides HttpServerUtilityBase.UrlDecode(String, TextWriter).)
Public methodUrlEncode(String)URL-encodes a string and returns the encoded string. (Overrides HttpServerUtilityBase.UrlEncode(String).)
Public methodUrlEncode(String, TextWriter)URL-encodes a string and sends the resulting output to a stream. (Overrides HttpServerUtilityBase.UrlEncode(String, TextWriter).)
Public methodUrlPathEncodeURL-encodes the path section of a URL string. (Overrides HttpServerUtilityBase.UrlPathEncode(String).)
Public methodUrlTokenDecodeDecodes a URL string token into an equivalent byte array by using base64 digits. (Overrides HttpServerUtilityBase.UrlTokenDecode(String).)
Public methodUrlTokenEncodeEncodes a byte array into an equivalent string representation by using base64 digits, which makes it usable for transmission on the URL. (Overrides HttpServerUtilityBase.UrlTokenEncode(Byte[]).)
Top

The HttpServerUtilityWrapper class derives from the HttpServerUtilityBase class and serves as a wrapper for the HttpServerUtility class. This class exposes the functionality of the HttpServerUtility class while also exposing the HttpServerUtilityBase type. The HttpServerUtilityBase class enables you to replace the original implementation of the HttpServerUtility class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.