Dela via


HttpSysOptions Class

Definition

Contains the options used by HttpSys.

public ref class HttpSysOptions
public class HttpSysOptions
type HttpSysOptions = class
Public Class HttpSysOptions
Inheritance
HttpSysOptions

Constructors

HttpSysOptions()

Initializes a new HttpSysOptions.

Properties

AllowSynchronousIO

Control whether synchronous input/output is allowed for the HttpContext.Request.Body and HttpContext.Response.Body. The default is false.

Authentication

Http.Sys authentication settings. These may be modified at any time prior to disposing the listener.

ClientCertificateMethod

Indicates how client certificates should be populated. The default is to allow a certificate without renegotiation. This does not change the netsh 'clientcertnegotiation' binding option which will need to be enabled for ClientCertificateMethod.AllowCertificate to resolve a certificate.

EnableKernelResponseBuffering

Enable buffering of response data in the Kernel. The default value is false. It should be used by an application doing synchronous I/O or by an application doing asynchronous I/O with no more than one outstanding write at a time, and can significantly improve throughput over high-latency connections. Applications that use asynchronous I/O and that may have more than one send outstanding at a time should not use this flag. Enabling this can results in higher CPU and memory usage by Http.Sys.

EnableResponseCaching

Attempt kernel-mode caching for responses with eligible headers. The response may not include Set-Cookie, Vary, or Pragma headers. It must include a Cache-Control header that's public and either a shared-max-age or max-age value, or an Expires header. The default is true.

Http503Verbosity

Gets or sets a value that controls how http.sys reacts when rejecting requests due to throttling conditions - like when the request queue limit is reached. The default in http.sys is "Basic" which means http.sys is just resetting the TCP connection. IIS uses Limited as its default behavior which will result in sending back a 503 - Service Unavailable back to the client. This settings does not apply when attaching to an existing queue.

MaxAccepts

The maximum number of concurrent accepts. The default is 5 times the number of processors as returned by ProcessorCount.

MaxConnections

Gets or sets the maximum number of concurrent connections to accept. Set -1 for infinite. Set to null to use the registry's machine-wide setting. The default value is null (machine-wide setting).

MaxRequestBodySize

Gets or sets the maximum allowed size of any request body in bytes. When set to null, the maximum request body size is unlimited. This limit has no effect on upgraded connections which are always unlimited. This can be overridden per-request via IHttpMaxRequestBodySizeFeature. The default is set to 30,000,000 bytes, which is approximately 28.6MB.

RequestQueueLimit

Gets or sets the maximum number of requests that will be queued up in Http.Sys. This settings does not apply when attaching to an existing queue. The default is 1000.

RequestQueueMode

This indicates whether the server is responsible for creating and configuring the request queue, or if it should attach to an existing queue. Most existing configuration options do not apply when attaching to an existing queue. The default is RequestQueueMode.Create.

RequestQueueName

The name of the Http.Sys request queue The default is null (Anonymous queue).

ThrowWriteExceptions

Gets or Sets if response body writes that fail due to client disconnects should throw exceptions or complete normally. The default is false (complete normally).

Timeouts

Exposes the Http.Sys timeout configurations. These may also be configured in the registry. These may be modified at any time prior to disposing the listener. These settings do not apply when attaching to an existing queue.

UnsafePreferInlineScheduling

Inline request processing instead of dispatching to the threadpool.

UrlPrefixes

The url prefixes to register with Http.Sys. These may be modified at any time prior to disposing the listener. When attached to an existing queue the prefixes are only used to compute PathBase for requests.

UseLatin1RequestHeaders

Configures request headers to use Latin1 encoding.

Applies to