WebExceptionStatus 列舉


定義 WebException 類別的狀態碼。Defines status codes for the WebException class.

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public enum class WebExceptionStatus
public enum WebExceptionStatus
type WebExceptionStatus = 
Public Enum WebExceptionStatus


CacheEntryNotFound 18

找不到指定的快取項目。The specified cache entry was not found.

ConnectFailure 2

無法在傳輸層級上連繫遠端服務點。The remote service point could not be contacted at the transport level.

ConnectionClosed 8

連接過早關閉。The connection was prematurely closed.

KeepAliveFailure 12

指定 Keep-alive 標頭的要求連接意外關閉。The connection for a request that specifies the Keep-alive header was closed unexpectedly.

MessageLengthLimitExceeded 17

從伺服器傳送要求或接收回應時,收到超過指定限制的訊息。A message was received that exceeded the specified limit when sending a request or receiving a response from the server.

NameResolutionFailure 1

名稱解析程式服務無法解析主機名稱。The name resolver service could not resolve the host name.

Pending 13

內部非同步要求正在擱置中。An internal asynchronous request is pending.

PipelineFailure 5

要求是導送 (Pipelined) 要求,並且在收到回應之前連線已關閉。The request was a pipelined request and the connection was closed before the response was received.

ProtocolError 7

接收自伺服器的回應是完整的,但它指示通訊協定 (Protocol) 層級錯誤。The response received from the server was complete but indicated a protocol-level error. 例如,HTTP 通訊協定錯誤 (例如 401 拒絕存取) 會使用這個狀態。For example, an HTTP protocol error such as 401 Access Denied would use this status.

ProxyNameResolutionFailure 15

名稱解析服務無法解析 Proxy 主機名稱。The name resolver service could not resolve the proxy host name.

ReceiveFailure 3

未從遠端伺服器收到完整的回應。A complete response was not received from the remote server.

RequestCanceled 6

要求被取消、呼叫 Abort() 方法,或發生無法分類的錯誤。The request was canceled, the Abort() method was called, or an unclassifiable error occurred. 這是 Status 的預設值。This is the default value for Status.

RequestProhibitedByCachePolicy 19

快取原則禁止該要求。The request was not permitted by the cache policy. 一般而言,當要求無法快取,並且有效的原則禁止要求傳送至伺服器時,會發生這個狀況。In general, this occurs when a request is not cacheable and the effective policy prohibits sending the request to the server. 如果要求方法暗示要求主體的存在、要求方法需要與伺服器直接互動,或要求包含條件標頭,則您可能會收到這個狀況。You might receive this status if a request method implies the presence of a request body, a request method requires direct interaction with the server, or a request contains a conditional header.

RequestProhibitedByProxy 20

Proxy 禁止這個要求。This request was not permitted by the proxy.

SecureChannelFailure 10

在使用 SSL 建立連接時發生錯誤。An error occurred while establishing a connection using SSL.

SendFailure 4

無法將完整的要求傳送到遠端伺服器。A complete request could not be sent to the remote server.

ServerProtocolViolation 11

伺服器回應不是有效的 HTTP 回應。The server response was not a valid HTTP response.

Success 0

沒有遇到任何錯誤。No error was encountered.

Timeout 14

在要求的逾時週期沒有接收到任何回應。No response was received during the time-out period for a request.

TrustFailure 9

無法驗證伺服器憑證。A server certificate could not be validated.

UnknownError 16

發生未知類型的例外狀況。An exception of unknown type has occurred.


WebExceptionStatus列舉會定義指派給屬性的狀態碼 StatusThe WebExceptionStatus enumeration defines the status codes assigned to the Status property.