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

HttpServerUtilityBase Class

Serves as the base class for classes that provide helper methods for processing Web requests.

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

The HttpServerUtilityBase type exposes the following members.

  NameDescription
Protected methodHttpServerUtilityBaseInitializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.
Top
  NameDescription
Public propertyMachineNameWhen overridden in a derived class, gets the server's computer name.
Public propertyScriptTimeoutWhen overridden in a derived class, gets or sets the request time-out value in seconds.
Top
  NameDescription
Public methodClearErrorWhen overridden in a derived class, clears the most recent exception.
Public methodCreateObject(String)When overridden in a derived class, creates a server instance of a COM object that is identified by the object's programmatic identifier (ProgID).
Public methodCreateObject(Type)When overridden in a derived class, creates a server instance of a COM object that is identified by the object's type.
Public methodCreateObjectFromClsidWhen overridden in a derived class, creates a server instance of a COM object that is identified by the object's class identifier (CLSID).
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodExecute(String)When overridden in a derived class, executes the handler for the specified virtual path in the context of the current process.
Public methodExecute(String, Boolean)When overridden in a derived class, 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.
Public methodExecute(String, TextWriter)When overridden in a derived class, 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.
Public methodExecute(IHttpHandler, TextWriter, Boolean)When overridden in a derived class, 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.
Public methodExecute(String, TextWriter, Boolean)When overridden in a derived class, 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.
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 methodGetLastErrorWhen overridden in a derived class, returns the most recent exception.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodHtmlDecode(String)When overridden in a derived class, decodes an HTML-encoded string and returns the decoded string.
Public methodHtmlDecode(String, TextWriter)When overridden in a derived class, decodes an HTML-encoded string and returns the results in a stream.
Public methodHtmlEncode(String)When overridden in a derived class, HTML-encodes a string and returns the encoded string.
Public methodHtmlEncode(String, TextWriter)When overridden in a derived class, HTML-encodes a string and sends the resulting output to an output stream.
Public methodMapPathWhen overridden in a derived class, returns the physical file path that corresponds to the specified virtual path on the Web server.
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)When overridden in a derived class, terminates execution of the current process and starts execution of a page or handler that is specified with a URL.
Public methodTransfer(IHttpHandler, Boolean)When overridden in a derived class, 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.
Public methodTransfer(String, Boolean)When overridden in a derived class, 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.
Public methodTransferRequest(String)When overridden in a derived class, asynchronously executes the end point at the specified URL.
Public methodTransferRequest(String, Boolean)When overridden in a derived class, asynchronously executes the endpoint at the specified URL and specifies whether to clear the QueryString and Form collections.
Public methodTransferRequest(String, Boolean, String, NameValueCollection)When overridden in a derived class, asynchronously executes the endpoint at the specified URL by using the specified HTTP method and headers.
Public methodTransferRequest(String, Boolean, String, NameValueCollection, Boolean)When implemented in a derived class, asynchronously executes the end point at the specified URL, using the specified HTTP method, headers, path, and options to preserve form values and preserve the user identity.
Public methodUrlDecode(String)When overridden in a derived class, decodes a URL-encoded string and returns the decoded string.
Public methodUrlDecode(String, TextWriter)When overridden in a derived class, decodes a URL-encoded string and sends the resulting output to a stream.
Public methodUrlEncode(String)When overridden in a derived class, URL-encodes a string and returns the encoded string.
Public methodUrlEncode(String, TextWriter)When overridden in a derived class, URL-encodes a string and sends the resulting output to a stream.
Public methodUrlPathEncodeWhen overridden in a derived class, URL-encodes the path section of a URL string.
Public methodUrlTokenDecodeWhen overridden in a derived class, decodes a URL string token into an equivalent byte array by using base64-encoded digits.
Public methodUrlTokenEncodeWhen overridden in a derived class, encodes a byte array into an equivalent string representation by using base64 digits, which makes it usable for transmission on the URL.
Top

The HttpServerUtilityBase class is an abstract class that contains the same members as the HttpServerUtility class. The HttpServerUtilityBase class enables you to create derived classes that are like the HttpServerUtility class, but that you can customize and that work outside the ASP.NET pipeline. When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario you are testing.

The HttpServerUtilityWrapper class derives from the HttpServerUtilityBase class. The HttpServerUtilityWrapper class serves as a wrapper for the HttpServerUtility class. At run time, you typically use an instance of the HttpServerUtilityWrapper class to call members of the HttpServerUtility object.

.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.